Dynamic Content in Embed
Hi Brizy,
I want to be able to access asset fields in embed elements. For example, when creating a new asset "Influencer", I want clients to provide embed code so that every influencer page is automatically generated with the provided embedded element. Another example would be to access an API given an asset's API key, then each asset's page automatically accesses the API with the API key provided during asset creation.
If this feature does not exist, please generate a feature request for this.
-
Hi Glen,
I am sorry; I could not fully comprehend your feature request.
At the moment, custom asset dynamic content are added using the Text element. Are you saying that dynamic content should also work when adding it to the Embed element?
I could not understand the use case you were discussing. How would making the dynamic content work with the Embed element help in generating the Influencer page dynamically?
0 -
Hi George,
Allow me to clarify the scenarios. If there are errors in how I understand Brizy and this functionality is already available, please do let me know.
Scenario 1: Uneditable Dynamic Content in Embed Element
Lets say I have custom asset "Influencer". To create a new influencer, the required information is Name, Feature Image, Description, and Instagram Embed code. Let's say I add this information for an influencer named "Jane".
Now that Jane was added, I should be able to go to Jane's page, which was automatically generated based on global templates and dynamic content, and scroll down to the embedded element which has the "Instagram Embed code" that was requested during asset creation. There, I will see Jane's Instagram feed embedded directly in Jane's page.
Next, I will add 4 additional Influencer assets with the required information for Sara, Michelle, Jenny, and Kara. This will allow me to automatically generate pages for any number of influencers without having to go into every new influencer's page to manually embed code.
Scenario 2: Editable Embed Element with access to Dynamic Content via a "Shortcode-like" syntax
Lets say I have custom asset "Stock". To create a new stock, the required information is Name, Logo, Description, Ticker, and API Key. In the template page for Stocks, there is an embedded element with the below code. Note that
{{Ticker}}
andbrz_context['Property Name']
are the Dynamic Content given during asset creation.<HTML><p>The current price of {{Ticker}} is <script type = "text/javascript">
URL = "https://api.fintech-stockdata.com/q?token=" + brz_context['API Key'] + "&ticker=" brz_context['Ticker']
function getPrice(url){
// JS API Fetch code here...
return json.price
}
document.write(getPrice(URL))
</script></p></html>Let's say I add this information for a stock named "Betflix".
Now that Betflix was added, I should be able to go on the automatically-generated page and get a proper price in the embedded element. The same scenario should work on the automatically-generated pages for any other Stocks that I add.
Please let me know if there is anything that requires more clarification or explanation.
0 -
Hi Glen,
Both features are not available at the moment. Thanks for taking the time to describe these in detail. I will add these as feature requests.
0
Please sign in to leave a comment.
Comments
3 comments