<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: Couldn't locate Hubl variable in blog post URL. in CMS Development</title>
    <link>https://community.hubspot.com/t5/CMS-Development/Couldn-t-locate-Hubl-variable-in-blog-post-URL/m-p/568198#M27170</link>
    <description>&lt;P&gt;If I'm understanding the question correctly, you just need to check if a specific string is in the url, if that's the case, the following would work:&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;{% if 'blog' in content.absolute_url #}
{# Blog HTML #}
{% else %}
{# Non-blog HTML #}
{% endif %}&lt;/LI-CODE&gt;
&lt;P&gt;&lt;BR /&gt;Note: If you are doing css, ensure that you are not in a modules css section, because you can't access hubl from there.&lt;BR /&gt;&lt;BR /&gt;Hope that help.&lt;/P&gt;</description>
    <pubDate>Wed, 02 Feb 2022 23:48:53 GMT</pubDate>
    <dc:creator>Brownstephen101</dc:creator>
    <dc:date>2022-02-02T23:48:53Z</dc:date>
    <item>
      <title>Couldn't locate Hubl variable in blog post URL.</title>
      <link>https://community.hubspot.com/t5/CMS-Development/Couldn-t-locate-Hubl-variable-in-blog-post-URL/m-p/567783#M27166</link>
      <description>&lt;P&gt;Hi, We have created dynamic footer based on the URL slug of website page. However, couldn't locate HubL variable for the blog post URL in the knowledge base. below code written to dynamically switch between footer. Could someone please confirm if this code will be able to handle blog listing and pages to dynamically switch footer? If not, is there any HubL variable that needs to be included?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;lt;style&amp;gt;&lt;BR /&gt;{# {% if widget_data.module_16425138492573.current_page == '1' %} #}&lt;BR /&gt;{% set current_url = request|urlize %}&lt;BR /&gt;{% if current_url is string_containing "/carriers" %}&lt;BR /&gt;.drivers_footer{&lt;BR /&gt;display:none;&lt;BR /&gt;}&lt;BR /&gt;{% else %}&lt;BR /&gt;.carriers_footer{&lt;BR /&gt;display:none;&lt;BR /&gt;}&lt;BR /&gt;{% endif %} #}&lt;BR /&gt;&amp;lt;/style&amp;gt;&lt;/P&gt;</description>
      <pubDate>Wed, 02 Feb 2022 14:42:15 GMT</pubDate>
      <guid>https://community.hubspot.com/t5/CMS-Development/Couldn-t-locate-Hubl-variable-in-blog-post-URL/m-p/567783#M27166</guid>
      <dc:creator>AShrivastava4</dc:creator>
      <dc:date>2022-02-02T14:42:15Z</dc:date>
    </item>
    <item>
      <title>Re: Couldn't locate Hubl variable in blog post URL.</title>
      <link>https://community.hubspot.com/t5/CMS-Development/Couldn-t-locate-Hubl-variable-in-blog-post-URL/m-p/568198#M27170</link>
      <description>&lt;P&gt;If I'm understanding the question correctly, you just need to check if a specific string is in the url, if that's the case, the following would work:&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;{% if 'blog' in content.absolute_url #}
{# Blog HTML #}
{% else %}
{# Non-blog HTML #}
{% endif %}&lt;/LI-CODE&gt;
&lt;P&gt;&lt;BR /&gt;Note: If you are doing css, ensure that you are not in a modules css section, because you can't access hubl from there.&lt;BR /&gt;&lt;BR /&gt;Hope that help.&lt;/P&gt;</description>
      <pubDate>Wed, 02 Feb 2022 23:48:53 GMT</pubDate>
      <guid>https://community.hubspot.com/t5/CMS-Development/Couldn-t-locate-Hubl-variable-in-blog-post-URL/m-p/568198#M27170</guid>
      <dc:creator>Brownstephen101</dc:creator>
      <dc:date>2022-02-02T23:48:53Z</dc:date>
    </item>
  </channel>
</rss>

