Repeating content from toggle inside a modal

We regularly use Modals to display cast photos and biographies for theatre shows.

At the moment, we set the same image as the image Toggle and then set it again inside the modal.
The same with the actor name and role - we set it on the Toggle and then again inside the modal.

This means that every time there’s a change or a new biography to add, we’re updating the same information in two places.

Since we are already saving the information once in the Toggle fields, is there a way to access this data and pull it into the modal via the meta custom field or similar?

Thanks!

Hi @timgroves,

Thanks for reaching out.
You can use the Dynamic Content to get the meta field value to set the image in the Toggle and you can also put that to the image inside the Modal content too.

Hope it helps.
Thanks

Hey Tristup,

Thanks so much for getting back to me.

Yes, I plan to use Dynamic Content to pull the image into the Modal content.

The issue is that all of the content only exists on the page - i.e, we set the toggle image to an image in the image library.

I’m trying to work out if we can use Dynamic Content to find out what the Toggle image of its parent is set to and pull that through.

I have a specific page built that will better demonstrate, so I will send that on a private link

Thanks

Tim

Hey @timgroves,

It would really help if you give us access to your site so that we can check those casts and biographies. It would be easier for us to think of a suggestion if we know how the data is structured. It might be possible to use Loopers so that you do not need to edit the page to add the modals once you add a cast or biography.

You can create a secure note in your next reply with the following info:
– Link to your site
– WP login URL
– WP username
– WP password
– WP Administrator Role
– Confirmation that we can access and make changes to your site

To know how to create a secure note, please check this out: How The Forum Works

image

Best Regards.

Hey Ruenel,

Thanks so much for your help.

Yes, I have granted you admin access to the site and will send the details in a secure note.

Thanks

Tim

Hello Tim,

I have checked the page and I found out that you actually added the cast and creatives manually. If I were to work on this one, I would create a custom post type “play” and have them be categorized as cast and creatives. With that settings, I could use Loopers so that when I add a cast or a creative, I no longer have to edit the page.

Check out this documentation regarding Loopers:

And to create a custom post type, you can check this out:

Best Regards.

Thanks Ruenel,

I was keen to avoid custom posts because the content is not updatable from the Cornerstone editor (so it’s an extra level of admin for my clients to update the website).

Also, using Loopers there is no way to change the order of the bios when placed on the page, which is a key request from our client.

To revert back to my original question - does this mean there is no way to access the data of a saved setting elsewhere on the page (i.e. the image chosen for the toggle) via the meta data to then place the same image elsewhere?

Thanks

Tim

Hi Tim,

We are not sure what you are expecting here. It seems that you are trying to get the image set to toggle dynamically into the Modal. If that is the case, unfortunately, there is no such option to do that.
If that is not the case, we need a little more clarification on what you are expecting.

Thanks

Hi Tristup,

Yes, precisely - that’s exactly what I was trying to achieve.

No problem, I just thought I would check since it would improve our workflow.

Thanks

Tim

Hi Tim,

You are most welcome.

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