CMS Development

matttunney
Top Contributor

Is there a variable that relates to the webpage version switch in settings

SOLVE

Is there a variable i can reference to show/hide the display web version url in an email, based on when the web version switch is set in settings?

http://designers.hubspot.com/docs/hubl/hubl-supported-variables

Example:

{% if correct_variable %}
<p>Not rendering correctly? View this email as a web page <a target="_blank" href="{{ view_as_page_url }}" data-viewaswebpage="true">here</a>.</p> 
{% endif %}

 Running test sends the view as web page text appears regardless of the setting being set in settings.

Thanks

1 Accepted solution
Jsum
Solution
Key Advisor

Is there a variable that relates to the webpage version switch in settings

SOLVE

@matttunney try this:

{% if content.create_page %}

{% endif %}

This is in Hubspot's email markup tutorial and it is surrounding the "view in page" markup, but there is no explaination as to what it is for anywhere that I can find. Most likely this is it though. Let me know.

View solution in original post

1 Reply 1
Jsum
Solution
Key Advisor

Is there a variable that relates to the webpage version switch in settings

SOLVE

@matttunney try this:

{% if content.create_page %}

{% endif %}

This is in Hubspot's email markup tutorial and it is surrounding the "view in page" markup, but there is no explaination as to what it is for anywhere that I can find. Most likely this is it though. Let me know.