Pass custom attributes as dynamic parameter for a looper provider

Hi,
I’m creating a component as a template for a slider.
This slider is using a looper provider and consumer to get the images from the post meta.
I want to pass the post meta ID through a custom attribute like x-gallery-id=“123”

So, when I add this component to any page, the custom attribute for the component will dictate the gallery id.

And then, the component itself would need to use this id as a parameter.

Is something like this possible? How?

Hey Catalin,

Thanks for writing in!

You can use the Parameter JSON:

{
  "gallery" : {
    "label"       : "Gallery ID",
    "type"        : "text",
    "initial"     : "123",
    "placeholder" : "Specify the Gallery ID"
  }
}

And then in your component attribute, you can have x-gallery-id and {{dc:p:gallery}}. And then in your Looper Provider Custom, the JSON would be:

{
  "id" : {{dc:p:gallery}}
}

Hope this makes sense.

That’s amazing. I’m impressed what kind of functionalities your page builder can create.
It works just like I wanted, thanks!

You are most welcome, Catalin.

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.