<?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 Hubl variable for website root url in CMS Development</title>
    <link>https://community.hubspot.com/t5/CMS-Development/Hubl-variable-for-website-root-url/m-p/467346#M24221</link>
    <description>&lt;P&gt;I have a header that contains a logo that when clicked takes you to the homepage.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The homepage is a root url&amp;nbsp;ie &lt;A href="http://www.mywebsite.com" target="_blank" rel="noopener"&gt;http://www.mywebsite.com&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I had expected as with other CMSs that there would a simple variable like {{ site_url }}&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have looked at the variable docs. There appears to be nothing. I had tried {{&amp;nbsp;group.absolute_url }} nothing as expected.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I would rather not hardcode the value.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;What is the correct HubL way to achieve this.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;</description>
    <pubDate>Tue, 27 Jul 2021 13:57:55 GMT</pubDate>
    <dc:creator>NPeters</dc:creator>
    <dc:date>2021-07-27T13:57:55Z</dc:date>
    <item>
      <title>Hubl variable for website root url</title>
      <link>https://community.hubspot.com/t5/CMS-Development/Hubl-variable-for-website-root-url/m-p/467346#M24221</link>
      <description>&lt;P&gt;I have a header that contains a logo that when clicked takes you to the homepage.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The homepage is a root url&amp;nbsp;ie &lt;A href="http://www.mywebsite.com" target="_blank" rel="noopener"&gt;http://www.mywebsite.com&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I had expected as with other CMSs that there would a simple variable like {{ site_url }}&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have looked at the variable docs. There appears to be nothing. I had tried {{&amp;nbsp;group.absolute_url }} nothing as expected.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I would rather not hardcode the value.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;What is the correct HubL way to achieve this.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;</description>
      <pubDate>Tue, 27 Jul 2021 13:57:55 GMT</pubDate>
      <guid>https://community.hubspot.com/t5/CMS-Development/Hubl-variable-for-website-root-url/m-p/467346#M24221</guid>
      <dc:creator>NPeters</dc:creator>
      <dc:date>2021-07-27T13:57:55Z</dc:date>
    </item>
    <item>
      <title>Re: Hubl variable for website root url</title>
      <link>https://community.hubspot.com/t5/CMS-Development/Hubl-variable-for-website-root-url/m-p/467384#M24223</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.hubspot.com/t5/user/viewprofilepage/user-id/174860"&gt;@NPeters&lt;/a&gt;&amp;nbsp;, you could try using&amp;nbsp;&lt;STRONG&gt;company_domain&amp;nbsp;&lt;/STRONG&gt;as described in the &lt;A href="https://developers.hubspot.com/docs/cms/hubl/variables#variables-available-in-all-templates" target="_blank" rel="noopener"&gt;documentation&lt;/A&gt;. It prints the value set in&amp;nbsp;&lt;STRONG&gt;Website&lt;/STRONG&gt;&lt;STRONG&gt;&amp;nbsp;&amp;gt; Pages &amp;gt; Branding &amp;gt; Logo Link&lt;/STRONG&gt;&lt;SPAN&gt;.&lt;BR /&gt;&lt;/SPAN&gt;If that does not give the expected result, you could use&amp;nbsp;&lt;SPAN&gt;&lt;STRONG&gt;group.absolute_url&lt;/STRONG&gt; or&amp;nbsp;&lt;STRONG&gt;content.absolute_url&amp;nbsp;&lt;/STRONG&gt;and use a filter to strip everything after the domain URL.&lt;BR /&gt;&lt;BR /&gt;What is the usecase for retrieving the homepage URL? You could also use a link field in a global module and set it to the homepage. This is what we do for all the headers we create that include the logo of the website.&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 27 Jul 2021 14:29:32 GMT</pubDate>
      <guid>https://community.hubspot.com/t5/CMS-Development/Hubl-variable-for-website-root-url/m-p/467384#M24223</guid>
      <dc:creator>Teun</dc:creator>
      <dc:date>2021-07-27T14:29:32Z</dc:date>
    </item>
    <item>
      <title>Re: Hubl variable for website root url</title>
      <link>https://community.hubspot.com/t5/CMS-Development/Hubl-variable-for-website-root-url/m-p/467394#M24226</link>
      <description>&lt;P&gt;&lt;a href="https://community.hubspot.com/t5/user/viewprofilepage/user-id/174860"&gt;@NPeters&lt;/a&gt;&amp;nbsp;I created a quick snippet to try. When using&amp;nbsp;&lt;STRONG&gt;request.full_url&amp;nbsp;&lt;/STRONG&gt;combined with&amp;nbsp;&lt;STRONG&gt;request.path&amp;nbsp;&lt;/STRONG&gt;you could retrieve the domain URL:&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;&amp;lt;section class="o-container"&amp;gt;
  &amp;lt;br /&amp;gt;&amp;lt;strong&amp;gt;request.full_url:&amp;lt;/strong&amp;gt; {{request.full_url}}&amp;lt;br /&amp;gt;
  &amp;lt;strong&amp;gt;request.path:&amp;lt;/strong&amp;gt; {{request.path}}&amp;lt;br /&amp;gt;
  &amp;lt;strong&amp;gt;filtered url:&amp;lt;/strong&amp;gt; {{request.full_url|replace(request.path, '')}}
&amp;lt;/section&amp;gt;
&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 27 Jul 2021 14:41:26 GMT</pubDate>
      <guid>https://community.hubspot.com/t5/CMS-Development/Hubl-variable-for-website-root-url/m-p/467394#M24226</guid>
      <dc:creator>Teun</dc:creator>
      <dc:date>2021-07-27T14:41:26Z</dc:date>
    </item>
    <item>
      <title>Re: Hubl variable for website root url</title>
      <link>https://community.hubspot.com/t5/CMS-Development/Hubl-variable-for-website-root-url/m-p/468087#M24240</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.hubspot.com/t5/user/viewprofilepage/user-id/174860"&gt;@NPeters&lt;/a&gt;&amp;nbsp;,&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN data-sheets-value="{&amp;quot;1&amp;quot;:2,&amp;quot;2&amp;quot;:&amp;quot;In the Hubspot module, we have the option for logo settings. you can use this module on your website. and can change the logo redirections and set the default also.\n\nhttps://developers.hubspot.com/docs/cms/building-blocks/modules/default-modules&amp;quot;}" data-sheets-userformat="{&amp;quot;2&amp;quot;:829,&amp;quot;3&amp;quot;:{&amp;quot;1&amp;quot;:0},&amp;quot;5&amp;quot;:{&amp;quot;1&amp;quot;:[{&amp;quot;1&amp;quot;:2,&amp;quot;2&amp;quot;:0,&amp;quot;5&amp;quot;:{&amp;quot;1&amp;quot;:2,&amp;quot;2&amp;quot;:0}},{&amp;quot;1&amp;quot;:0,&amp;quot;2&amp;quot;:0,&amp;quot;3&amp;quot;:3},{&amp;quot;1&amp;quot;:1,&amp;quot;2&amp;quot;:0,&amp;quot;4&amp;quot;:1}]},&amp;quot;6&amp;quot;:{&amp;quot;1&amp;quot;:[{&amp;quot;1&amp;quot;:2,&amp;quot;2&amp;quot;:0,&amp;quot;5&amp;quot;:{&amp;quot;1&amp;quot;:2,&amp;quot;2&amp;quot;:0}},{&amp;quot;1&amp;quot;:0,&amp;quot;2&amp;quot;:0,&amp;quot;3&amp;quot;:3},{&amp;quot;1&amp;quot;:1,&amp;quot;2&amp;quot;:0,&amp;quot;4&amp;quot;:1}]},&amp;quot;7&amp;quot;:{&amp;quot;1&amp;quot;:[{&amp;quot;1&amp;quot;:2,&amp;quot;2&amp;quot;:0,&amp;quot;5&amp;quot;:{&amp;quot;1&amp;quot;:2,&amp;quot;2&amp;quot;:0}},{&amp;quot;1&amp;quot;:0,&amp;quot;2&amp;quot;:0,&amp;quot;3&amp;quot;:3},{&amp;quot;1&amp;quot;:1,&amp;quot;2&amp;quot;:0,&amp;quot;4&amp;quot;:1}]},&amp;quot;8&amp;quot;:{&amp;quot;1&amp;quot;:[{&amp;quot;1&amp;quot;:2,&amp;quot;2&amp;quot;:0,&amp;quot;5&amp;quot;:{&amp;quot;1&amp;quot;:2,&amp;quot;2&amp;quot;:0}},{&amp;quot;1&amp;quot;:0,&amp;quot;2&amp;quot;:0,&amp;quot;3&amp;quot;:3},{&amp;quot;1&amp;quot;:1,&amp;quot;2&amp;quot;:0,&amp;quot;4&amp;quot;:1}]},&amp;quot;11&amp;quot;:4,&amp;quot;12&amp;quot;:0}"&gt;In the Hubspot module, we have the option for logo settings. you can use this module on your website. and can change the logo redirections and set the default also.&lt;BR /&gt;&lt;BR /&gt;&lt;A href="https://developers.hubspot.com/docs/cms/building-blocks/modules/default-modules" target="_blank"&gt;https://developers.hubspot.com/docs/cms/building-blocks/modules/default-modules&lt;/A&gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;
&lt;P data-unlink="true"&gt;&lt;SPAN&gt;Hope this helps!&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;&lt;BR /&gt;If we were able to answer your query, kindly help the community by marking it as a solution.&lt;BR /&gt;&lt;BR /&gt;Thanks and Regards.&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 28 Jul 2021 13:42:50 GMT</pubDate>
      <guid>https://community.hubspot.com/t5/CMS-Development/Hubl-variable-for-website-root-url/m-p/468087#M24240</guid>
      <dc:creator>webdew</dc:creator>
      <dc:date>2021-07-28T13:42:50Z</dc:date>
    </item>
    <item>
      <title>Re: Hubl variable for website root url</title>
      <link>https://community.hubspot.com/t5/CMS-Development/Hubl-variable-for-website-root-url/m-p/1232100#M44701</link>
      <description>&lt;P&gt;Great solution, I'd tweak this slightly so that it works on your homepage:&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;&amp;lt;a href="{% if request.path == "/" %}
{{ request.full_url }}
{% else %}
{{ request.full_url|replace(request.path, '') }}
{% endif %}"&amp;gt;
  &amp;lt;img class="logo"&amp;gt;
&amp;lt;/a&amp;gt;&lt;/LI-CODE&gt;&lt;P&gt;Otherwise you would end up with &lt;A href="http://www.mywebsite.com/mywebsite.com" target="_blank"&gt;http://www.mywebsite.com/mywebsite.com&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 08 Dec 2025 22:02:09 GMT</pubDate>
      <guid>https://community.hubspot.com/t5/CMS-Development/Hubl-variable-for-website-root-url/m-p/1232100#M44701</guid>
      <dc:creator>gunnarnormand</dc:creator>
      <dc:date>2025-12-08T22:02:09Z</dc:date>
    </item>
  </channel>
</rss>

