Using Variables in WP and PG Interactions

Hey,

I try to create a Wordpress block with a Pinegrow Interaction animation. The Animation sets a src value of an element. I would like to be able to type in the src attribute in the Wordpress block editor.

Maybe the best way is to set a block attribute and define a variable which I can use in the Interactions?

Does anyone has an idea? @adamslowe

2 Likes

Oooh, that’s an interesting use case. I can’t say that I’ve done anything like this before, but your solution seems to make sense.

Can you give us a little more information about what you are trying to do? Maybe someone else has done something similar or can point you in the right direction?

2 Likes

Thanks for you reply! I try to build a consent tool for YouTube Videos. It’s an iframe which gets a src parameter (video url) after clicking “I agree”. Clicking the agree button starts a Pinegrow interaction which sets the src to the iFrame. I works fine.

But I want to use it as / in a Wordpress block and the user should be able to type in the video url as a block attribute.

Any Ideas? @matjaz @Emmanuel @RobM