<?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: How to use standard_header_includes without loading layout.css in CMS Development</title>
    <link>https://community.hubspot.com/t5/CMS-Development/How-to-use-standard-header-includes-without-loading-layout-css/m-p/770950#M33393</link>
    <description>&lt;P&gt;I can see that, but the point is I don't want it to do that and I want to use my own code for that. For example, I would like to be able to go to a section and select centre vertical alignment, and my own code would handle that rather than the page editor. Say I would like to use grid instead of flex, I can't overwrite the page editor because of all the !important tags and I can't prevent someone from coming in and potentially selecting an alignment from the options and messing up the layout. If there were no !important tags it would be easily changed, but alas.&lt;/P&gt;</description>
    <pubDate>Mon, 20 Mar 2023 09:02:05 GMT</pubDate>
    <dc:creator>SBurnett28</dc:creator>
    <dc:date>2023-03-20T09:02:05Z</dc:date>
    <item>
      <title>How to use standard_header_includes without loading layout.css</title>
      <link>https://community.hubspot.com/t5/CMS-Development/How-to-use-standard-header-includes-without-loading-layout-css/m-p/580302#M27504</link>
      <description>&lt;P&gt;I am building a template, and want to use "{{ standard_header_includes }}" so it will include any google analytics, and additional header from the settings but I don't want it to load its own layout.css.&amp;nbsp; Is there a way to tell it now to?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Based on this&amp;nbsp;&lt;A href="https://developers.hubspot.com/docs/cms/hubl/variables#required-page-template-variables" target="_blank"&gt;https://developers.hubspot.com/docs/cms/hubl/variables#required-page-template-variables&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="tkruger_0-1645455679546.png" style="width: 400px;"&gt;&lt;img src="https://community.hubspot.com/t5/image/serverpage/image-id/60046i2021699FCA340306/image-size/medium?v=v2&amp;amp;px=400" role="button" title="tkruger_0-1645455679546.png" alt="tkruger_0-1645455679546.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I want to use my own layout.css though. It is odd because the boilerplate template comes with a layout.css but also has this included.&amp;nbsp;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;When using&amp;nbsp;{{ standard_header_includes }}&lt;/P&gt;&lt;P&gt;You get in your header the following:&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="tkruger_1-1645455776331.png" style="width: 400px;"&gt;&lt;img src="https://community.hubspot.com/t5/image/serverpage/image-id/60049i829E1C5D9065F5C8/image-size/medium?v=v2&amp;amp;px=400" role="button" title="tkruger_1-1645455776331.png" alt="tkruger_1-1645455776331.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;That is what I am trying to prevent.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 21 Feb 2022 15:04:10 GMT</pubDate>
      <guid>https://community.hubspot.com/t5/CMS-Development/How-to-use-standard-header-includes-without-loading-layout-css/m-p/580302#M27504</guid>
      <dc:creator>tkruger</dc:creator>
      <dc:date>2022-02-21T15:04:10Z</dc:date>
    </item>
    <item>
      <title>Re: How to use standard_header_includes without loading layout.css</title>
      <link>https://community.hubspot.com/t5/CMS-Development/How-to-use-standard-header-includes-without-loading-layout-css/m-p/580453#M27506</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.hubspot.com/t5/user/viewprofilepage/user-id/147070"&gt;@tkruger&lt;/a&gt;, you can set your own variable to be equal to "standard_header_includes", then loop through every line in the variable and if it includes the CSS file then don't add it to your template.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Something like this:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;{% set custom_header_includes = standard_header_includes|split('\n') %}

{% for line in custom_header_includes %}

    {% unless line is string_containing 'the-file-to-exclude.css' %}
        {{line}}
    {% endunless %}

{% endfor %}&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;By doing this you would be adding all the necessary code except the CSS.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;We do something similar in several of our pages and it works for us.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Hope this helps!&lt;/P&gt;</description>
      <pubDate>Mon, 21 Feb 2022 18:01:36 GMT</pubDate>
      <guid>https://community.hubspot.com/t5/CMS-Development/How-to-use-standard-header-includes-without-loading-layout-css/m-p/580453#M27506</guid>
      <dc:creator>albertsg</dc:creator>
      <dc:date>2022-02-21T18:01:36Z</dc:date>
    </item>
    <item>
      <title>Re: How to use standard_header_includes without loading layout.css</title>
      <link>https://community.hubspot.com/t5/CMS-Development/How-to-use-standard-header-includes-without-loading-layout-css/m-p/768430#M33292</link>
      <description>&lt;P&gt;Hi there,&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I've tried to do this but I get an error saying, "Template cannot include the tag {{ standard_header_includes }} more than once."&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;This is what the template looks like:&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="SBurnett28_0-1678800771629.png" style="width: 999px;"&gt;&lt;img src="https://community.hubspot.com/t5/image/serverpage/image-id/87268i39B2C0E0E49CE228/image-size/large?v=v2&amp;amp;px=999" role="button" title="SBurnett28_0-1678800771629.png" alt="SBurnett28_0-1678800771629.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;I've only called standard_header_includes once.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 14 Mar 2023 13:36:39 GMT</pubDate>
      <guid>https://community.hubspot.com/t5/CMS-Development/How-to-use-standard-header-includes-without-loading-layout-css/m-p/768430#M33292</guid>
      <dc:creator>SBurnett28</dc:creator>
      <dc:date>2023-03-14T13:36:39Z</dc:date>
    </item>
    <item>
      <title>Re: How to use standard_header_includes without loading layout.css</title>
      <link>https://community.hubspot.com/t5/CMS-Development/How-to-use-standard-header-includes-without-loading-layout-css/m-p/769969#M33362</link>
      <description>&lt;P&gt;Hello&amp;nbsp;&lt;a href="https://community.hubspot.com/t5/user/viewprofilepage/user-id/263016"&gt;@SBurnett28&lt;/a&gt;&amp;nbsp;, Try removing the {{ custom_header_includes }}, the content of the "&lt;SPAN&gt;standard_header_includes" is already being added to the page via for loop.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&lt;BR /&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="SBurnett28_0-1678800771629.jpg" style="width: 507px;"&gt;&lt;img src="https://community.hubspot.com/t5/image/serverpage/image-id/87509i7E2EA58A5FBF649F/image-size/large?v=v2&amp;amp;px=999" role="button" title="SBurnett28_0-1678800771629.jpg" alt="SBurnett28_0-1678800771629.jpg" /&gt;&lt;/span&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 16 Mar 2023 20:06:44 GMT</pubDate>
      <guid>https://community.hubspot.com/t5/CMS-Development/How-to-use-standard-header-includes-without-loading-layout-css/m-p/769969#M33362</guid>
      <dc:creator>harsimran</dc:creator>
      <dc:date>2023-03-16T20:06:44Z</dc:date>
    </item>
    <item>
      <title>Re: How to use standard_header_includes without loading layout.css</title>
      <link>https://community.hubspot.com/t5/CMS-Development/How-to-use-standard-header-includes-without-loading-layout-css/m-p/770164#M33367</link>
      <description>&lt;P&gt;Ah right you are, silly me. Ultimately though the styles are still added to the page as it seems they're being added through style tags directly, rather than through a stylesheet link?&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="SBurnett28_0-1679044579105.png" style="width: 400px;"&gt;&lt;img src="https://community.hubspot.com/t5/image/serverpage/image-id/87543i2D57D34BEB18D48B/image-size/medium?v=v2&amp;amp;px=400" role="button" title="SBurnett28_0-1679044579105.png" alt="SBurnett28_0-1679044579105.png" /&gt;&lt;/span&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="SBurnett28_1-1679044617611.png" style="width: 400px;"&gt;&lt;img src="https://community.hubspot.com/t5/image/serverpage/image-id/87544i571451062937C30D/image-size/medium?v=v2&amp;amp;px=400" role="button" title="SBurnett28_1-1679044617611.png" alt="SBurnett28_1-1679044617611.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 17 Mar 2023 09:18:21 GMT</pubDate>
      <guid>https://community.hubspot.com/t5/CMS-Development/How-to-use-standard-header-includes-without-loading-layout-css/m-p/770164#M33367</guid>
      <dc:creator>SBurnett28</dc:creator>
      <dc:date>2023-03-17T09:18:21Z</dc:date>
    </item>
    <item>
      <title>Re: How to use standard_header_includes without loading layout.css</title>
      <link>https://community.hubspot.com/t5/CMS-Development/How-to-use-standard-header-includes-without-loading-layout-css/m-p/770461#M33381</link>
      <description>&lt;P&gt;These styles are added by the page editor and can be removed by editing the page section/modules in the page designer.&lt;/P&gt;</description>
      <pubDate>Fri, 17 Mar 2023 19:48:55 GMT</pubDate>
      <guid>https://community.hubspot.com/t5/CMS-Development/How-to-use-standard-header-includes-without-loading-layout-css/m-p/770461#M33381</guid>
      <dc:creator>harsimran</dc:creator>
      <dc:date>2023-03-17T19:48:55Z</dc:date>
    </item>
    <item>
      <title>Re: How to use standard_header_includes without loading layout.css</title>
      <link>https://community.hubspot.com/t5/CMS-Development/How-to-use-standard-header-includes-without-loading-layout-css/m-p/770950#M33393</link>
      <description>&lt;P&gt;I can see that, but the point is I don't want it to do that and I want to use my own code for that. For example, I would like to be able to go to a section and select centre vertical alignment, and my own code would handle that rather than the page editor. Say I would like to use grid instead of flex, I can't overwrite the page editor because of all the !important tags and I can't prevent someone from coming in and potentially selecting an alignment from the options and messing up the layout. If there were no !important tags it would be easily changed, but alas.&lt;/P&gt;</description>
      <pubDate>Mon, 20 Mar 2023 09:02:05 GMT</pubDate>
      <guid>https://community.hubspot.com/t5/CMS-Development/How-to-use-standard-header-includes-without-loading-layout-css/m-p/770950#M33393</guid>
      <dc:creator>SBurnett28</dc:creator>
      <dc:date>2023-03-20T09:02:05Z</dc:date>
    </item>
    <item>
      <title>Re: How to use standard_header_includes without loading layout.css</title>
      <link>https://community.hubspot.com/t5/CMS-Development/How-to-use-standard-header-includes-without-loading-layout-css/m-p/1118957#M42385</link>
      <description>&lt;P&gt;Hello! This doesn't prevent HubSpot for adding their own CSS since the style is being added by &amp;lt;style&amp;gt; tag. I'm trying to customize a form and there is no way to override those styles. I've tried many solution but seems like the only answer is to prevent that &amp;lt;style&amp;gt; tag to being added. Any ideas on how to achieve this?&lt;/P&gt;</description>
      <pubDate>Thu, 06 Mar 2025 16:28:22 GMT</pubDate>
      <guid>https://community.hubspot.com/t5/CMS-Development/How-to-use-standard-header-includes-without-loading-layout-css/m-p/1118957#M42385</guid>
      <dc:creator>SantiagoMilano</dc:creator>
      <dc:date>2025-03-06T16:28:22Z</dc:date>
    </item>
  </channel>
</rss>

