<?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 can I make changes to my blog template without affecting my live website? in CMS Development</title>
    <link>https://community.hubspot.com/t5/CMS-Development/How-can-I-make-changes-to-my-blog-template-without-affecting-my/m-p/661762#M29380</link>
    <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.hubspot.com/t5/user/viewprofilepage/user-id/367528"&gt;@FurqanAli&lt;/a&gt;,&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;to apply changes to a non-drag&amp;amp;drop blog (listing) page you could&lt;/P&gt;
&lt;OL&gt;
&lt;LI&gt;duplicate the template&lt;/LI&gt;
&lt;LI&gt;apply your changes&lt;/LI&gt;
&lt;LI&gt;create a new blog (for testing reasons) with a few "lorem ipsum" posts&lt;/LI&gt;
&lt;LI&gt;apply the "new" template to your test blog&lt;/LI&gt;
&lt;LI&gt;test it&lt;/LI&gt;
&lt;LI&gt;if it works like you want&lt;/LI&gt;
&lt;LI&gt;apply the template to your main blog&lt;/LI&gt;
&lt;LI&gt;delete your test blog&lt;/LI&gt;
&lt;/OL&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;For a drag&amp;amp;drop blog (listing) page you could edit the blog listing &lt;STRONG&gt;without saving/publishing&amp;nbsp;&lt;/STRONG&gt;and preview your changes. If your done, publish the changes&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;There are multiple ways to go how to toggle sections globally. If you're familiar with JSON you could edit the fields.json of your theme by adding a "Show section" boolean into into (I recommend to put it somewhere in the blog tab if you got one) and create a simple if-statement in your template.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;It would look something like this&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;fields.json&lt;/STRONG&gt;&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;...
,{
"name": "blog",
"label": "Blog",
"required": false,
"locked": false,
"children": [
  {
    "name": "show_section",
    "label": "Show section",
    "required": false,
    "locked": false,
    "type": "boolean",
    "inline_help_text": "",
    "help_text": "Toggle visibility of a section in the blog",
    "default": false }
],
"type": "group",
"inline_help_text": "",
"help_text": "",
"default": {} 
}&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;template.html&lt;/STRONG&gt;&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;{% if theme.blog.show_custom_section %}
...
Your section layout/module
...
{% endif %}&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;important: in this example it's just "theme.blog.show_custom_section" because it's in the blog group. If you put it in a different group you'll need to change the path.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Another way would be to create a custom global module for the whole section with a boolean. It should look like this:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;module&lt;/STRONG&gt;&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;{% if module.show_custom_section %}
...
Your section module layout
...
{% endif %}&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;template.html&lt;/STRONG&gt;&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;...
{% module "custom_blog_section_module" path="PATH-TO-THE-MODULE", label="Custom Section Name" %}
...&lt;/LI-CODE&gt;
&lt;P&gt;the easiest way to get this code is to copy it either from the very bottom of the right sidebar in the module view or by right-clicking on the module in the design-tools finder and selecting "copy snippet".&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;best,&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Anton&lt;/P&gt;</description>
    <pubDate>Fri, 08 Jul 2022 06:03:39 GMT</pubDate>
    <dc:creator>Anton</dc:creator>
    <dc:date>2022-07-08T06:03:39Z</dc:date>
    <item>
      <title>How can I make changes to my blog template without affecting my live website?</title>
      <link>https://community.hubspot.com/t5/CMS-Development/How-can-I-make-changes-to-my-blog-template-without-affecting-my/m-p/661269#M29371</link>
      <description>&lt;P&gt;Hi there,&lt;BR /&gt;&lt;BR /&gt;I wanted to know how I can review my changes to the blog template without affecting the live website as I need to add a section to the blog template. Also, can someone guide me on how to add global settings for showing and hiding sections in the blog template?&lt;BR /&gt;&lt;BR /&gt;Thanks a lot.&lt;/P&gt;</description>
      <pubDate>Thu, 07 Jul 2022 11:52:11 GMT</pubDate>
      <guid>https://community.hubspot.com/t5/CMS-Development/How-can-I-make-changes-to-my-blog-template-without-affecting-my/m-p/661269#M29371</guid>
      <dc:creator>FurqanAli</dc:creator>
      <dc:date>2022-07-07T11:52:11Z</dc:date>
    </item>
    <item>
      <title>Re: How can I make changes to my blog template without affecting my live website?</title>
      <link>https://community.hubspot.com/t5/CMS-Development/How-can-I-make-changes-to-my-blog-template-without-affecting-my/m-p/661762#M29380</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.hubspot.com/t5/user/viewprofilepage/user-id/367528"&gt;@FurqanAli&lt;/a&gt;,&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;to apply changes to a non-drag&amp;amp;drop blog (listing) page you could&lt;/P&gt;
&lt;OL&gt;
&lt;LI&gt;duplicate the template&lt;/LI&gt;
&lt;LI&gt;apply your changes&lt;/LI&gt;
&lt;LI&gt;create a new blog (for testing reasons) with a few "lorem ipsum" posts&lt;/LI&gt;
&lt;LI&gt;apply the "new" template to your test blog&lt;/LI&gt;
&lt;LI&gt;test it&lt;/LI&gt;
&lt;LI&gt;if it works like you want&lt;/LI&gt;
&lt;LI&gt;apply the template to your main blog&lt;/LI&gt;
&lt;LI&gt;delete your test blog&lt;/LI&gt;
&lt;/OL&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;For a drag&amp;amp;drop blog (listing) page you could edit the blog listing &lt;STRONG&gt;without saving/publishing&amp;nbsp;&lt;/STRONG&gt;and preview your changes. If your done, publish the changes&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;There are multiple ways to go how to toggle sections globally. If you're familiar with JSON you could edit the fields.json of your theme by adding a "Show section" boolean into into (I recommend to put it somewhere in the blog tab if you got one) and create a simple if-statement in your template.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;It would look something like this&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;fields.json&lt;/STRONG&gt;&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;...
,{
"name": "blog",
"label": "Blog",
"required": false,
"locked": false,
"children": [
  {
    "name": "show_section",
    "label": "Show section",
    "required": false,
    "locked": false,
    "type": "boolean",
    "inline_help_text": "",
    "help_text": "Toggle visibility of a section in the blog",
    "default": false }
],
"type": "group",
"inline_help_text": "",
"help_text": "",
"default": {} 
}&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;template.html&lt;/STRONG&gt;&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;{% if theme.blog.show_custom_section %}
...
Your section layout/module
...
{% endif %}&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;important: in this example it's just "theme.blog.show_custom_section" because it's in the blog group. If you put it in a different group you'll need to change the path.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Another way would be to create a custom global module for the whole section with a boolean. It should look like this:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;module&lt;/STRONG&gt;&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;{% if module.show_custom_section %}
...
Your section module layout
...
{% endif %}&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;template.html&lt;/STRONG&gt;&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;...
{% module "custom_blog_section_module" path="PATH-TO-THE-MODULE", label="Custom Section Name" %}
...&lt;/LI-CODE&gt;
&lt;P&gt;the easiest way to get this code is to copy it either from the very bottom of the right sidebar in the module view or by right-clicking on the module in the design-tools finder and selecting "copy snippet".&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;best,&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Anton&lt;/P&gt;</description>
      <pubDate>Fri, 08 Jul 2022 06:03:39 GMT</pubDate>
      <guid>https://community.hubspot.com/t5/CMS-Development/How-can-I-make-changes-to-my-blog-template-without-affecting-my/m-p/661762#M29380</guid>
      <dc:creator>Anton</dc:creator>
      <dc:date>2022-07-08T06:03:39Z</dc:date>
    </item>
    <item>
      <title>Re: How can I make changes to my blog template without affecting my live website?</title>
      <link>https://community.hubspot.com/t5/CMS-Development/How-can-I-make-changes-to-my-blog-template-without-affecting-my/m-p/666823#M29580</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;thanks for the great answer can you please let me know once we add the additional JSON in fields.json where will the field will show for hiding and showing of blog section?&lt;/P&gt;</description>
      <pubDate>Mon, 18 Jul 2022 12:48:42 GMT</pubDate>
      <guid>https://community.hubspot.com/t5/CMS-Development/How-can-I-make-changes-to-my-blog-template-without-affecting-my/m-p/666823#M29580</guid>
      <dc:creator>FurqanAli</dc:creator>
      <dc:date>2022-07-18T12:48:42Z</dc:date>
    </item>
    <item>
      <title>Re: How can I make changes to my blog template without affecting my live website?</title>
      <link>https://community.hubspot.com/t5/CMS-Development/How-can-I-make-changes-to-my-blog-template-without-affecting-my/m-p/666958#M29585</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.hubspot.com/t5/user/viewprofilepage/user-id/367528"&gt;@FurqanAli&lt;/a&gt;,&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;sure - you'll find the field in your theme settings.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;The theme settings are located here&lt;/P&gt;
&lt;P&gt;Hub Settings(cog icon top right corner) &amp;gt; Website &amp;gt; Designs &amp;gt; YOUR THEME NAME&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If you added it in the blog group you should see it there&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>Mon, 18 Jul 2022 15:59:42 GMT</pubDate>
      <guid>https://community.hubspot.com/t5/CMS-Development/How-can-I-make-changes-to-my-blog-template-without-affecting-my/m-p/666958#M29585</guid>
      <dc:creator>Anton</dc:creator>
      <dc:date>2022-07-18T15:59:42Z</dc:date>
    </item>
  </channel>
</rss>

