<?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 change header and footer background color using json file? in CMS Development</title>
    <link>https://community.hubspot.com/t5/CMS-Development/How-to-change-header-and-footer-background-color-using-json-file/m-p/859280#M36136</link>
    <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.hubspot.com/t5/user/viewprofilepage/user-id/123775"&gt;@danmoyle&lt;/a&gt;&amp;nbsp;, thanks for the help ! I appreciate that !&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Wed, 04 Oct 2023 08:46:25 GMT</pubDate>
    <dc:creator>AzharBondi</dc:creator>
    <dc:date>2023-10-04T08:46:25Z</dc:date>
    <item>
      <title>How to change header and footer background color using json file?</title>
      <link>https://community.hubspot.com/t5/CMS-Development/How-to-change-header-and-footer-background-color-using-json-file/m-p/858772#M36120</link>
      <description>&lt;P&gt;Hi,&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;Note: This is a project made from scratch so I am not using the boilerplate (one of the requirements in the CMS Developer Practicum)&lt;BR /&gt;&lt;BR /&gt;So with that said, I would love to be able to change the footer and header colors using the page editor !&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="AzharBondi_0-1696338624336.png" style="width: 400px;"&gt;&lt;img src="https://community.hubspot.com/t5/image/serverpage/image-id/100312iE603D1741BCA9109/image-size/medium?v=v2&amp;amp;px=400" role="button" title="AzharBondi_0-1696338624336.png" alt="AzharBondi_0-1696338624336.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;and this is the json file code I am using !&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;[&lt;BR /&gt;{&lt;BR /&gt;"label": "Header and Footer Background Color",&lt;BR /&gt;"name": "header_and_footer_bg_color",&lt;BR /&gt;"type": "color",&lt;BR /&gt;"visibility": {&lt;BR /&gt;"hidden_subfields": {&lt;BR /&gt;"opacity": true&lt;BR /&gt;}&lt;BR /&gt;},&lt;BR /&gt;"default": {&lt;BR /&gt;"color": "#425b76"&lt;BR /&gt;}&lt;BR /&gt;}&lt;BR /&gt;&lt;BR /&gt;]&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="AzharBondi_1-1696338846264.png" style="width: 400px;"&gt;&lt;img src="https://community.hubspot.com/t5/image/serverpage/image-id/100313i6C654185FBE18D25/image-size/medium?v=v2&amp;amp;px=400" role="button" title="AzharBondi_1-1696338846264.png" alt="AzharBondi_1-1696338846264.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;How can I make sure that the color change in footer and header ? (now not working)&lt;BR /&gt;&lt;BR /&gt;Should I add a specific tag into header.html and footer.html files or should I make a change in the json file so it knows I am targeting the footer and header ?&lt;BR /&gt;&lt;BR /&gt;Thanks in advance,&amp;nbsp;&lt;BR /&gt;Best regards!!&lt;BR /&gt;Azhar&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 03 Oct 2023 15:11:17 GMT</pubDate>
      <guid>https://community.hubspot.com/t5/CMS-Development/How-to-change-header-and-footer-background-color-using-json-file/m-p/858772#M36120</guid>
      <dc:creator>AzharBondi</dc:creator>
      <dc:date>2023-10-03T15:11:17Z</dc:date>
    </item>
    <item>
      <title>Re: How to change header and footer background color using json file?</title>
      <link>https://community.hubspot.com/t5/CMS-Development/How-to-change-header-and-footer-background-color-using-json-file/m-p/858965#M36127</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.hubspot.com/t5/user/viewprofilepage/user-id/597903"&gt;@AzharBondi&lt;/a&gt;! I think your best bet is &lt;A href="https://developers.hubspot.com/docs/cms/building-blocks/module-theme-fields-overview" target="_blank" rel="noopener"&gt;this documentation&lt;/A&gt; that helps with json and modules (and more). There's a section that includes some info on editing the footer.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;a href="https://community.hubspot.com/t5/user/viewprofilepage/user-id/363300"&gt;@Jnix284&lt;/a&gt;&amp;nbsp;is this a questin you have a more specific solution for with your design experience?&amp;nbsp;&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>Tue, 03 Oct 2023 17:33:13 GMT</pubDate>
      <guid>https://community.hubspot.com/t5/CMS-Development/How-to-change-header-and-footer-background-color-using-json-file/m-p/858965#M36127</guid>
      <dc:creator>danmoyle</dc:creator>
      <dc:date>2023-10-03T17:33:13Z</dc:date>
    </item>
    <item>
      <title>Re: How to change header and footer background color using json file?</title>
      <link>https://community.hubspot.com/t5/CMS-Development/How-to-change-header-and-footer-background-color-using-json-file/m-p/858983#M36128</link>
      <description>&lt;P&gt;Happy to jump in&amp;nbsp;&lt;a href="https://community.hubspot.com/t5/user/viewprofilepage/user-id/123775"&gt;@danmoyle&lt;/a&gt;&amp;nbsp;- to clarify&amp;nbsp;&lt;a href="https://community.hubspot.com/t5/user/viewprofilepage/user-id/597903"&gt;@AzharBondi&lt;/a&gt;&amp;nbsp;, when you configure your fields.json you're creating a list of variables that you're allowing the user to modify.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;The fields.json allows you to set the default value and then provide the user to configure different values in the Theme Settings editor.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;It doesn't define how these colors are used within the theme.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;You could create a variables.CSS where you define variables that use the colors from the theme settings and then you would use those variables to code the module for the header/footer, etc.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;For example, something like this:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;    --header_and_footer_bkgd_color:    {{ theme.colors.header_and_footer_bkgd_color.color }};&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;My suggestion would be to create a naming convention that makes it easy to code these colors consistently throughout your theme.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Hope this helps!&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 03 Oct 2023 18:19:02 GMT</pubDate>
      <guid>https://community.hubspot.com/t5/CMS-Development/How-to-change-header-and-footer-background-color-using-json-file/m-p/858983#M36128</guid>
      <dc:creator>Jnix284</dc:creator>
      <dc:date>2023-10-03T18:19:02Z</dc:date>
    </item>
    <item>
      <title>Re: How to change header and footer background color using json file?</title>
      <link>https://community.hubspot.com/t5/CMS-Development/How-to-change-header-and-footer-background-color-using-json-file/m-p/859280#M36136</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.hubspot.com/t5/user/viewprofilepage/user-id/123775"&gt;@danmoyle&lt;/a&gt;&amp;nbsp;, thanks for the help ! I appreciate that !&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 04 Oct 2023 08:46:25 GMT</pubDate>
      <guid>https://community.hubspot.com/t5/CMS-Development/How-to-change-header-and-footer-background-color-using-json-file/m-p/859280#M36136</guid>
      <dc:creator>AzharBondi</dc:creator>
      <dc:date>2023-10-04T08:46:25Z</dc:date>
    </item>
    <item>
      <title>Re: How to change header and footer background color using json file?</title>
      <link>https://community.hubspot.com/t5/CMS-Development/How-to-change-header-and-footer-background-color-using-json-file/m-p/859288#M36137</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.hubspot.com/t5/user/viewprofilepage/user-id/363300"&gt;@Jnix284&lt;/a&gt;,&amp;nbsp;&lt;BR /&gt;thank you for your quick response to&amp;nbsp;&lt;a href="https://community.hubspot.com/t5/user/viewprofilepage/user-id/123775"&gt;@danmoyle&lt;/a&gt;&amp;nbsp;tag !&amp;nbsp;&lt;BR /&gt;So I tried to understand what you mentioned above and took these steps that I am going to share with you !&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;1/ in the layout.css file I added these lines of code&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="AzharBondi_0-1696409297405.png" style="width: 400px;"&gt;&lt;img src="https://community.hubspot.com/t5/image/serverpage/image-id/100401i7D1D51C64314B9AB/image-size/medium?v=v2&amp;amp;px=400" role="button" title="AzharBondi_0-1696409297405.png" alt="AzharBondi_0-1696409297405.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;2/ went to header.html and footer.html and added the link to the layout.css&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="AzharBondi_1-1696409385215.png" style="width: 400px;"&gt;&lt;img src="https://community.hubspot.com/t5/image/serverpage/image-id/100402i9AB42DA41CC01EBC/image-size/medium?v=v2&amp;amp;px=400" role="button" title="AzharBondi_1-1696409385215.png" alt="AzharBondi_1-1696409385215.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;3/I added the variable name into the header.html and footer.html&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="AzharBondi_2-1696409453870.png" style="width: 400px;"&gt;&lt;img src="https://community.hubspot.com/t5/image/serverpage/image-id/100403iF3890BF4B2DB99E7/image-size/medium?v=v2&amp;amp;px=400" role="button" title="AzharBondi_2-1696409453870.png" alt="AzharBondi_2-1696409453870.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;I tried to troubleshoot why it is still not applying changes to the background color&lt;/P&gt;&lt;P&gt;of header and footer but I am a bit stuck ! Do you have an idea based on the code I provided why no changes are happening?&lt;BR /&gt;&lt;BR /&gt;Thanks a ton!&amp;nbsp;&lt;BR /&gt;Best regards,&amp;nbsp;&lt;BR /&gt;Azhar&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 04 Oct 2023 08:54:34 GMT</pubDate>
      <guid>https://community.hubspot.com/t5/CMS-Development/How-to-change-header-and-footer-background-color-using-json-file/m-p/859288#M36137</guid>
      <dc:creator>AzharBondi</dc:creator>
      <dc:date>2023-10-04T08:54:34Z</dc:date>
    </item>
    <item>
      <title>Re: How to change header and footer background color using json file?</title>
      <link>https://community.hubspot.com/t5/CMS-Development/How-to-change-header-and-footer-background-color-using-json-file/m-p/859385#M36142</link>
      <description>&lt;P&gt;Hello Azhar! Ive replied to you in Slack channel! Hope it helps you!&lt;BR /&gt;Regards!&lt;/P&gt;</description>
      <pubDate>Wed, 04 Oct 2023 11:52:42 GMT</pubDate>
      <guid>https://community.hubspot.com/t5/CMS-Development/How-to-change-header-and-footer-background-color-using-json-file/m-p/859385#M36142</guid>
      <dc:creator>romerocam</dc:creator>
      <dc:date>2023-10-04T11:52:42Z</dc:date>
    </item>
    <item>
      <title>Re: How to change header and footer background color using json file?</title>
      <link>https://community.hubspot.com/t5/CMS-Development/How-to-change-header-and-footer-background-color-using-json-file/m-p/859436#M36144</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.hubspot.com/t5/user/viewprofilepage/user-id/597903"&gt;@AzharBondi&lt;/a&gt;,&amp;nbsp;you're definitely on the right track, but without diving into your code in more depth to understand how you have everything configured I'm not able to find an obvious answer from the screenshots.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;For more help with code, I suggest joining the &lt;A href="https://developers.hubspot.com/slack" target="_blank" rel="noopener"&gt;HubSpot Developer Slack&lt;/A&gt; where you'll be able to connect with other devs working on the practicum to get further guidance.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 04 Oct 2023 12:54:00 GMT</pubDate>
      <guid>https://community.hubspot.com/t5/CMS-Development/How-to-change-header-and-footer-background-color-using-json-file/m-p/859436#M36144</guid>
      <dc:creator>Jnix284</dc:creator>
      <dc:date>2023-10-04T12:54:00Z</dc:date>
    </item>
    <item>
      <title>Re: How to change header and footer background color using json file?</title>
      <link>https://community.hubspot.com/t5/CMS-Development/How-to-change-header-and-footer-background-color-using-json-file/m-p/859770#M36149</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.hubspot.com/t5/user/viewprofilepage/user-id/597903"&gt;@AzharBondi&lt;/a&gt;,&amp;nbsp;&lt;/P&gt;
&lt;P&gt;great progression so far.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;While you can put css into templates by using&amp;nbsp;&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;{% require_css %}
&amp;lt;style&amp;gt;
/* YOUR CSS */
&amp;lt;/style&amp;gt;
{% end_require_css %}&lt;/LI-CODE&gt;
&lt;P&gt;(here's the &lt;A href="https://developers.hubspot.com/docs/cms/building-blocks/modules/files#require-css-block" target="_blank" rel="noopener"&gt;documentation&lt;/A&gt; for this since this is extremly useful for custom modules, sections and such)&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I wouldn't recommend this since it's gonna add the CSS only to this template and this is definitely not a best-practise.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If you're working with&amp;nbsp;&lt;a href="https://community.hubspot.com/t5/user/viewprofilepage/user-id/363300"&gt;@Jnix284&lt;/a&gt;&amp;nbsp;approach of&amp;nbsp;&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;:root{
--header_and_footer_bkgd_color: {{ theme.colors.header_and_footer_bkgd_color.color }};
}&lt;/LI-CODE&gt;
&lt;P&gt;you should put this into your theme-override.css and write it like this&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;:root{
--header_and_footer_bkgd_color: {{ theme.colors.header_and_footer_bkgd_color.color }};
}
/* more variables, CSS */

header,footer{
background-color: var(--header_and_footer_bkgd_color);
}&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;There are many ways how you can work with fields.json and the css files and as almost always: there is no right or wrong. It always depends on the client/project you're working on&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;In most cases I write my CSS files like this:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;{%- set header_footer_bg = theme.colors.header_and_footer_bkgd_color.color -%}
/* more variables, CSS */

header, footer{
background-color: {{ header_footer_bg }};
}

/* you can also do things like 
header, footer{
background-color: rgba({{ header_footer_bg|convert_rgb }}, .3);
}
*/&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;By doing so you have all variables on top of the file and you don't have to look for all interations of "theme.colors.header_and_footer_bkgd_color.css" in the file if you want to change something.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Again - there are countless ways to achieve your goal.&lt;/P&gt;
&lt;P&gt;The most important thing is to get started and to understand &lt;A href="https://developers.hubspot.com/docs/cms/hubl/if-statements" target="_blank" rel="noopener"&gt;if-statements&lt;/A&gt;, &lt;A href="https://developers.hubspot.com/docs/cms/hubl/for-loops" target="_blank" rel="noopener"&gt;for-loops(repeater)&lt;/A&gt;,&amp;nbsp;&lt;A href="https://developers.hubspot.com/docs/cms/hubl/filters" target="_blank" rel="noopener"&gt;filters&lt;/A&gt; and &lt;A href="https://developers.hubspot.com/docs/cms/hubl/functions" target="_blank" rel="noopener"&gt;functions&lt;/A&gt; but once you've mastered them you can do quite a lot and modify the "CMS" part of HubSpot to your needs.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;hope this helps&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;best,&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Anton&lt;/P&gt;</description>
      <pubDate>Wed, 04 Oct 2023 21:56:27 GMT</pubDate>
      <guid>https://community.hubspot.com/t5/CMS-Development/How-to-change-header-and-footer-background-color-using-json-file/m-p/859770#M36149</guid>
      <dc:creator>Anton</dc:creator>
      <dc:date>2023-10-04T21:56:27Z</dc:date>
    </item>
    <item>
      <title>Re: How to change header and footer background color using json file?</title>
      <link>https://community.hubspot.com/t5/CMS-Development/How-to-change-header-and-footer-background-color-using-json-file/m-p/860068#M36157</link>
      <description>&lt;P&gt;&lt;a href="https://community.hubspot.com/t5/user/viewprofilepage/user-id/17186"&gt;@Anton&lt;/a&gt;&amp;nbsp;coming in hot with some great knowledge!&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 05 Oct 2023 12:30:23 GMT</pubDate>
      <guid>https://community.hubspot.com/t5/CMS-Development/How-to-change-header-and-footer-background-color-using-json-file/m-p/860068#M36157</guid>
      <dc:creator>danmoyle</dc:creator>
      <dc:date>2023-10-05T12:30:23Z</dc:date>
    </item>
    <item>
      <title>Re: How to change header and footer background color using json file?</title>
      <link>https://community.hubspot.com/t5/CMS-Development/How-to-change-header-and-footer-background-color-using-json-file/m-p/861138#M36193</link>
      <description>&lt;P&gt;Thank you&amp;nbsp;&lt;a href="https://community.hubspot.com/t5/user/viewprofilepage/user-id/17186"&gt;@Anton&lt;/a&gt;&amp;nbsp;! I really appreciate the help !&lt;/P&gt;</description>
      <pubDate>Fri, 06 Oct 2023 23:51:54 GMT</pubDate>
      <guid>https://community.hubspot.com/t5/CMS-Development/How-to-change-header-and-footer-background-color-using-json-file/m-p/861138#M36193</guid>
      <dc:creator>AzharBondi</dc:creator>
      <dc:date>2023-10-06T23:51:54Z</dc:date>
    </item>
    <item>
      <title>Re: How to change header and footer background color using json file?</title>
      <link>https://community.hubspot.com/t5/CMS-Development/How-to-change-header-and-footer-background-color-using-json-file/m-p/861139#M36194</link>
      <description>&lt;P&gt;Thank you&amp;nbsp;&lt;a href="https://community.hubspot.com/t5/user/viewprofilepage/user-id/492045"&gt;@romerocam&lt;/a&gt;&amp;nbsp;!&amp;nbsp;I really appreciate the help !&lt;/P&gt;</description>
      <pubDate>Fri, 06 Oct 2023 23:53:28 GMT</pubDate>
      <guid>https://community.hubspot.com/t5/CMS-Development/How-to-change-header-and-footer-background-color-using-json-file/m-p/861139#M36194</guid>
      <dc:creator>AzharBondi</dc:creator>
      <dc:date>2023-10-06T23:53:28Z</dc:date>
    </item>
  </channel>
</rss>

