La fonction de suggestion automatique permet d'affiner rapidement votre recherche en suggérant des correspondances possibles au fur et à mesure de la frappe.
New to HubL - Can't seem to get the Content from Content.name
Résolue
Hi,
I'm new to Hubl and can't seem to get the content from content.name for an if statement. I've tried numerous ways to no avail. Below is as example of what I'm trying to do.
Any help would be apprecaited.
<h1>{{ content.name }}</h1>
{% if content.name == 'Blog' %} <h2 class="sub_heading">Latest blog insights from Node4.</h2> {% elif content.name == 'Events' %} <h2 class="sub_heading">Latest Event insights from Node4.</h2> {% elif content.name == 'News' %} <h2 class="sub_heading">Latest News from Node4.</h2> {% endif %}
New to HubL - Can't seem to get the Content from Content.name
Résolue
Anton,
Thank you for you help. I'm probably not being clear nor using the correct terminology. At the moment theres a module that I have inheritted. On the listing templates in Hubspot, they using the same background cover as a global module with {{ content.name }} included over the background image. This content.name is outputting Blog, Event or News as a Title dependant which area you go into. These are brough through from the settings > Blog section and uses the field Header.
What I wanted to do was as the page is shown, have some subtext underneath that is dependant on the content.name.
New to HubL - Can't seem to get the Content from Content.name
Résolue
Anton,
Thank you for you help. I'm probably not being clear nor using the correct terminology. At the moment theres a module that I have inheritted. On the listing templates in Hubspot, they using the same background cover as a global module with {{ content.name }} included over the background image. This content.name is outputting Blog, Event or News as a Title dependant which area you go into. These are brough through from the settings > Blog section and uses the field Header.
What I wanted to do was as the page is shown, have some subtext underneath that is dependant on the content.name.