Variables In Dynamic Content - Question | JoomShaper

Variables In Dynamic Content

O

Oliver

SP Page Builder 10 months ago

Hello,

currently I explore the Dynamic Content in Page Builder. And I just discovered the Variables, described in the documentation to dynamically fill SEO information. But I cannot find a docu, how they are defined and work. Do you have a hint for me please? Can I use any (custom) field within my Dynamic Content as a variable?

To make it more concrete: Can I use a variable for the coordinates of a Google Maps addon? I have a custom field in my Collection, containing the coordinates of a location and want to display it dynamically an my details page.

Thank you very much in advance! Oli

1
15 Answers
Ofi Khan
Ofi Khan
Accepted Answer
Support Agent 10 months ago #191961

Yes, they are used only for SEO purposes.

0
Ofi Khan
Ofi Khan
Accepted Answer
Support Agent 10 months ago #191907

Hello Oliver,

Thank you for reaching out to our technical support forum. I’m sorry to hear about the trouble you’re experiencing. Please check out the documentation:

SP Page Builder Dynamic SEO

Hopefully, your confusion will be clear. If you go to the Dynamic Content -> Details page, then you will see the available variables to use.

Best regards

0
O
Oliver
Accepted Answer
10 months ago #191910

Hello Ofi,

thank you for your reply. But I don't get it, to be honest.

I was referring to this article SP Page Builder Dynamic SEO myself. What do you mean with "If you go to the Dynamic Content -> Details page, then you will see the available variables to use."? Does this mean in the mentioned article, in the PageBuilder backend? Sorry, I am confused and cannot follow.

Kind regards.

0
Ofi Khan
Ofi Khan
Accepted Answer
Support Agent 10 months ago #191966

Please watch this short screencast:

files.fm/u/at4837q5yr

0
O
Oliver
Accepted Answer
10 months ago #191955

Are these variables for the SEO only?

0
O
Oliver
Accepted Answer
10 months ago #191997

Thank you for you answer and the screencast. But it is VERY unfortunate that the variables are not supported elsewhere. It would be a killer extension to PageBuilder, if it supported the variables in the addons - as destination for buttons for example, or coordinates for the Google Maps addon. Maybe you could seriously consider this as a feature suggestion for the next PageBuilder version?

Thank you again for your help.

0
Ofi Khan
Ofi Khan
Accepted Answer
Support Agent 10 months ago #192019

Sorry, this will be not be possible for now. This will make SP Page Builder complex and will break the existing design. However, I will ask the team if there is any possibility to use the variables otherwise. Can you share any example to understand the feature better?

0
O
Oliver
Accepted Answer
10 months ago #192027

Yes, certainly.

Let us say, I want to use Dynamic Content for events - commercial events. I use a component, which provides a booking functionality and registration process for events, payment and confirmation email and all that stuff. But it looks pretty ugly (which it really does ;-). I want to rebuild the events in PageBuilder and create a lovely design (which PageBuilder is just the best for!). But I need to provide a button "book event" and this must redirect to the registration URL for that specific event. Means, it must redirect to an individual target URL. For my understanding, it could be done by set the Link of the button to for example a custom field "Link" within the Dynamic Content. Thus, I could put in the individual URL into the custom field "Link" and the button would use it as its destination.

I hope, I did not describe it to confusing.

0
Ofi Khan
Ofi Khan
Accepted Answer
Support Agent 10 months ago #192095

Okay, I got this. I will discuss it with the development team.

0
O
Oliver
Accepted Answer
9 months ago #192437

Just to put something on top. If you take a look at the template Federal. Wouldn't it make much more sense and be a great extension, if every event would have its own location shown in a map? Just for your discussion and consideration.

0
Ofi Khan
Ofi Khan
Accepted Answer
Support Agent 9 months ago #192597

I agree with your idea. Okay, I will put this on the developer's table.

0
LG
Leon Garcia
Accepted Answer
6 months ago #202033

Hi Im currently trying to explore this feature in a catalogue site. Dynamic variables on SEO.
I´ve ran in a lot of apparent bugs. (I read all documentation already and these answers)

I already have a couple of products, a collection with 20 testing variables and both dynamic pages (collection and single page).

My Available created Variables are being displayed on SEO configuration editor (as options within their corresponding braces under the input box). But when I insert/write/copy them in the input field they dont display in the front end (seems they are not being parsed) (they are displayed the same as the variable). I thought it was a plugin issue or maybe to activate a missing plugin but only search plugins are disabled.

I´ve tried many things already.

  1. Remove all utf8 special characters (in another test collection)
  2. Make a new collection
  3. Clearing browser cache
  4. Clearing joomla cache
  5. Clearing server cache (also serveral times as the past ones)
  6. Tried to access the preview from the menu (with normal slugs) and aditionally throught the SPPB preview url
  7. Tried using only lower case
  8. Tried using single bracket
  9. Tried doble bracket
  10. Tried with surrounding text
  11. Tried with only the variable inserted.
  12. Tried metadesc, keywords, og image, etc.. All SEO fields in that part.

None of these have worked:

  1. I have sppb pro with valid license
  2. I have the latest version
  3. I already tried to reinstall it
  4. The site is a fresh joomla 5 instalation (its updated )

I also tried putting the variable on the title. So I can define the page title (but I would understand that part maybe is not designed to parse anything yet).

I cannot make it work..

Are these bugs? If not, how can I make this work? (as I am on a production deadline, and if you think this will take very long, instead I can use joomla custom fields)

0
Ofi Khan
Ofi Khan
Accepted Answer
Support Agent 6 months ago #202067

Hello Leon Garcia,

Please remove your credentials from the post for your safety. It is visible to the post owner.

Then post a new question regarding your issue. We will check and help you.

Best regards

0
sitte
sitte
Accepted Answer
1 month ago #217547

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

0
Ofi Khan
Ofi Khan
Accepted Answer
Support Agent 3 weeks ago #217605

Hello sitte,

Thanks for sharing youre experience. It will help the community.

Best regards

0