Embed html with dynamic code

We do real estate analytics. We use CMS and have a list of properties on sale.

We have a single CMS driven page to create all the single property pages.
I want to embed an iframe on that dynamic page, that dynamically fetches a different html for each property.

We want to embed jupyter notebooks with the flat analytics on the page, and obviously each page will have to call for a different object to embed.

The question is how can I get a reference to the page that is being displayed, so I know which html to embed to make it match the property.

I hope it’s making sense. Thanks!

@rileyrichter @webdev @mattvaru do you guys have any thoughts?

This is a bit outside my scope of code knowledge! This sounds more like a custom script using the API to pull data in from an outside source.

TIA, Brandon

1 Like

Thanks for the mention, Brandon! I think I follow what @AlphaBlock is wanting to achieve here - essentially rendering a unique block of HTML on a CMS page.

AlphaBlock - would it be possible to have a value in your CMS Item that contains the actual embed code that you’d want to render? Jeff (@webdev) actually has a really good blog post on this specific topic. See here:

Let me know if his solution helps! :slight_smile:

1 Like