CMS Development

hd-hs
Teilnehmer/-in

Placeholders for HubDB content on landing page

lösung

I am using HubDB to pull data onto a landing page. The trouble I am having is that people editing the page cannot see the content in the editor view of the landing page (as the data is dynamic).

Is there any way to pull in some dummy content so that the people editing the page can at least see where the text will sit (the content is all text at the moment).

0 Upvotes
1 Akzeptierte Lösung
hd-hs
Lösung
Teilnehmer/-in

Placeholders for HubDB content on landing page

lösung

Fixed this by adding a check to see if the database column had content in it. Then added an else condition which displays placeholder text.

In the landing pages editor the database content is not pulled through (so the check will never return > 1) and it therefore falls through to the 'else' condition.

 

{% if dynamic_page_hubdb_row.hs_parent_row.hs_name | length > 1 %} {{ dynamic_page_hubdb_row.hs_parent_row.hs_name }} {% else %} PLACEHOLDER TEXT HERE {% endif %}

 

Lösung in ursprünglichem Beitrag anzeigen

2 Antworten
ramanverma2005
Teilnehmer/-in

Placeholders for HubDB content on landing page

lösung

can you please explain to me how you are doing that one ?

0 Upvotes
hd-hs
Lösung
Teilnehmer/-in

Placeholders for HubDB content on landing page

lösung

Fixed this by adding a check to see if the database column had content in it. Then added an else condition which displays placeholder text.

In the landing pages editor the database content is not pulled through (so the check will never return > 1) and it therefore falls through to the 'else' condition.

 

{% if dynamic_page_hubdb_row.hs_parent_row.hs_name | length > 1 %} {{ dynamic_page_hubdb_row.hs_parent_row.hs_name }} {% else %} PLACEHOLDER TEXT HERE {% endif %}