Hi everyone,
I want to share a solution that extends the functionality of Dynamic Content addons (specifically Text and Image).
By default, SP Page Builder allows you to map a field to a specific addon setting (e.g., Map "Title" to "Content"). However, sometimes we need more flexibility - for example, inserting a custom link from a collection into the Link field manually, or mixing static text with dynamic data.
I created a template override based on SP Page Builder 6.1.2 that enables variable parsing (Mustache-style tokens) in all output fields.
How it works:
You can use variables like {{Field Name}} inside the addon's content, link inputs, or even download attributes. The override automatically fetches the field names from your Collection and replaces them with values.
Variable Format Support: If you have a field in your Collection named "Product Price", you can use any of the following formats:
{{Product Price}} (Original name)
{{product price}} (Lowercase)
{{product-price}} (Slug format - recommended)
Use Case Example:
I wanted to manually control where each item in my Dynamic Collection links to.
I created a Link field in my Collection and filled it with custom URLs (e.g., /my-custom-page).
In the Dynamic Content Text addon, I set the content to display the Title.
In the Link field of the addon, instead of selecting a source, I simply typed: {{link}}.
The addon now renders the title linked to my custom URL dynamically
Installation:
Do not edit the core files. Instead, use the Template Override method.
Create the following directory path in your active template:
/templates/<THEME_NAME>/sppagebuilder/addons/dynamic_content_text/site.php
/templates/<THEME_NAME>/sppagebuilder/addons/dynamic_content_image/site.php
Files:
https://www.dropbox.com/scl/fo/rk8d8adr04slv7ooca40e/ACPPzpWy1rNf_SVc5halYjU?rlkey=okt9i65dc8nwnprry6yflr6s2&dl=0