<?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: Dropdown Menu Always Visible in CMS Development</title>
    <link>https://community.hubspot.com/t5/CMS-Development/Dropdown-Menu-Always-Visible/m-p/356839#M17678</link>
    <description>&lt;P&gt;Alright, here's an outline of our issue and what I did to solve. We had a custom Header module that we moved to a second domain. During that process, the main navigation menu didn't appear anymore. One of my teammates got the menu to appear eventually, but when we went to add child items, the dropdown function wasn't working.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Here is the code that set the menu for the original Header module:&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;{% set mainMenu = menu(widget_data.controls.change_header_main_menu) %}&lt;BR /&gt;&amp;lt;span class="hs-menu-wrapper"&amp;gt;&lt;BR /&gt;  &amp;lt;ul&amp;gt;&lt;BR /&gt;   {% for first in mainMenu.children %}&lt;/PRE&gt;&lt;P&gt;My teammate change it to:&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;{% menu id="{{ widget_data.Controls-1587388426226-11462845861796415.change_header_main_menu }}" %}        	
&amp;lt;span class="hs-menu-wrapper"&amp;gt;
 &amp;lt;ul&amp;gt;	
  {% for first in mainMenu.children %}&lt;/PRE&gt;&lt;P&gt;As you can see, they removed the "set" function in the code, which I discovered broke the "mainMenu" variable below&amp;nbsp; that controlled the child menu items.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;When I updated the second example to match the "set" example in the first module, I got an error because I can't have hyphens in the module name.&amp;nbsp; I cloned that controls module, renamed it, then updated the header module.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt; {% set mainMenu = menu(widget_data.Controls_JW.change_header_main_menu) %}        	
&amp;lt;span class="hs-menu-wrapper"&amp;gt;
  &amp;lt;ul&amp;gt;	
     {% for first in mainMenu.children %}&lt;/PRE&gt;&lt;P&gt;Now, the menu is still not working at this point.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Then I learned about "&lt;A href="https://developers.hubspot.com/docs/cms/building-blocks/modules/export-to-template-context" target="_blank" rel="noopener"&gt;export_to_template&lt;/A&gt;" and realized my next step. I needed to update the "additional head markup" and "Wrapping HTML" on my page template.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;So that's what I did. I added this code to my "Additional head markup"&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;{% module "Controls_JW" module_id="32648989754" label="Settings &amp;amp; Controls JW", no_wrapper=true, export_to_template_context=True %}&lt;/PRE&gt;&lt;P&gt;Then I clicked on my header module in the template, and added the below to the "Wrapping HTML" code section.&lt;/P&gt;&lt;PRE&gt;{{ widget_data.controls_JW.change_header_main_menu }}&lt;/PRE&gt;&lt;P&gt;And &lt;A href="https://portal.collabrance.com/test" target="_blank" rel="noopener"&gt;now it works!&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I'll leave the test page / example up. Note, anyone else won't be able to click on any links since the rest of the site needs registration to view.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Cheers!&lt;/P&gt;&lt;P&gt;John&lt;/P&gt;</description>
    <pubDate>Thu, 23 Jul 2020 15:02:26 GMT</pubDate>
    <dc:creator>jwiedenheft</dc:creator>
    <dc:date>2020-07-23T15:02:26Z</dc:date>
    <item>
      <title>Dropdown Menu Always Visible</title>
      <link>https://community.hubspot.com/t5/CMS-Development/Dropdown-Menu-Always-Visible/m-p/355379#M17584</link>
      <description>&lt;P&gt;Test page with Test menu &amp;gt;&amp;nbsp;&lt;A href="https://portal.collabrance.com/test" target="_blank"&gt;https://portal.collabrance.com/test&lt;/A&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Screen Shot 2020-07-17 at 3.01.03 PM.png" style="width: 489px;"&gt;&lt;img src="https://community.hubspot.com/t5/image/serverpage/image-id/29366i17885F3F8231D46A/image-dimensions/489x173?v=v2" width="489" height="173" role="button" title="Screen Shot 2020-07-17 at 3.01.03 PM.png" alt="Screen Shot 2020-07-17 at 3.01.03 PM.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;As you can see, the child items are always visible, the horizontal and vertical spacing of the parent items is incorrect. And the styling of the drop down is incorrect. Should look like:&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Screen Shot 2020-07-17 at 3.02.40 PM.png" style="width: 218px;"&gt;&lt;img src="https://community.hubspot.com/t5/image/serverpage/image-id/29367i399C95590E7DAF09/image-dimensions/218x290?v=v2" width="218" height="290" role="button" title="Screen Shot 2020-07-17 at 3.02.40 PM.png" alt="Screen Shot 2020-07-17 at 3.02.40 PM.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;What am I missing? I'm thinking the header module isn't picking up the styling or JS, but I can't tell why. Note, I didn't make/design this, so I'm trying to figure it out.&lt;/P&gt;</description>
      <pubDate>Fri, 17 Jul 2020 20:05:35 GMT</pubDate>
      <guid>https://community.hubspot.com/t5/CMS-Development/Dropdown-Menu-Always-Visible/m-p/355379#M17584</guid>
      <dc:creator>jwiedenheft</dc:creator>
      <dc:date>2020-07-17T20:05:35Z</dc:date>
    </item>
    <item>
      <title>Re: Dropdown Menu Always Visible</title>
      <link>https://community.hubspot.com/t5/CMS-Development/Dropdown-Menu-Always-Visible/m-p/355382#M17585</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.hubspot.com/t5/user/viewprofilepage/user-id/17680"&gt;@jwiedenheft&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I cant see this link, for me need password and login. You can use the other option for private page in HubSpot, and only need passwords that you define in settings of page.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Can update this page with this condition and send the password to we can open?&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I'm waiting.&lt;/P&gt;
&lt;P&gt;Thanks! &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 17 Jul 2020 20:25:39 GMT</pubDate>
      <guid>https://community.hubspot.com/t5/CMS-Development/Dropdown-Menu-Always-Visible/m-p/355382#M17585</guid>
      <dc:creator>DanielSanchez</dc:creator>
      <dc:date>2020-07-17T20:25:39Z</dc:date>
    </item>
    <item>
      <title>Re: Dropdown Menu Always Visible</title>
      <link>https://community.hubspot.com/t5/CMS-Development/Dropdown-Menu-Always-Visible/m-p/355388#M17586</link>
      <description>&lt;P&gt;Forgot about that. Removed the login requirement since it's only a test page. The links in the menu won't work, but the page should be visible.&lt;/P&gt;</description>
      <pubDate>Fri, 17 Jul 2020 20:37:39 GMT</pubDate>
      <guid>https://community.hubspot.com/t5/CMS-Development/Dropdown-Menu-Always-Visible/m-p/355388#M17586</guid>
      <dc:creator>jwiedenheft</dc:creator>
      <dc:date>2020-07-17T20:37:39Z</dc:date>
    </item>
    <item>
      <title>Re: Dropdown Menu Always Visible</title>
      <link>https://community.hubspot.com/t5/CMS-Development/Dropdown-Menu-Always-Visible/m-p/355803#M17612</link>
      <description>&lt;P&gt;&lt;a href="https://community.hubspot.com/t5/user/viewprofilepage/user-id/76319"&gt;@DanielSanchez&lt;/a&gt;&amp;nbsp;Were you able to look at this? Much appreciated if you do!&lt;/P&gt;</description>
      <pubDate>Mon, 20 Jul 2020 20:52:07 GMT</pubDate>
      <guid>https://community.hubspot.com/t5/CMS-Development/Dropdown-Menu-Always-Visible/m-p/355803#M17612</guid>
      <dc:creator>jwiedenheft</dc:creator>
      <dc:date>2020-07-20T20:52:07Z</dc:date>
    </item>
    <item>
      <title>Re: Dropdown Menu Always Visible</title>
      <link>https://community.hubspot.com/t5/CMS-Development/Dropdown-Menu-Always-Visible/m-p/356170#M17624</link>
      <description>&lt;P&gt;I was able to solve this. Will hopefully post the solution shortly.&lt;/P&gt;</description>
      <pubDate>Tue, 21 Jul 2020 20:22:43 GMT</pubDate>
      <guid>https://community.hubspot.com/t5/CMS-Development/Dropdown-Menu-Always-Visible/m-p/356170#M17624</guid>
      <dc:creator>jwiedenheft</dc:creator>
      <dc:date>2020-07-21T20:22:43Z</dc:date>
    </item>
    <item>
      <title>Re: Dropdown Menu Always Visible</title>
      <link>https://community.hubspot.com/t5/CMS-Development/Dropdown-Menu-Always-Visible/m-p/356625#M17656</link>
      <description>&lt;P&gt;&lt;a href="https://community.hubspot.com/t5/user/viewprofilepage/user-id/17680"&gt;@jwiedenheft&lt;/a&gt;,&amp;nbsp;glad you figured it out!&amp;nbsp; &lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Would love for you to throw your solution up here so others can learn from you!&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 23 Jul 2020 00:24:01 GMT</pubDate>
      <guid>https://community.hubspot.com/t5/CMS-Development/Dropdown-Menu-Always-Visible/m-p/356625#M17656</guid>
      <dc:creator>dennisedson</dc:creator>
      <dc:date>2020-07-23T00:24:01Z</dc:date>
    </item>
    <item>
      <title>Re: Dropdown Menu Always Visible</title>
      <link>https://community.hubspot.com/t5/CMS-Development/Dropdown-Menu-Always-Visible/m-p/356839#M17678</link>
      <description>&lt;P&gt;Alright, here's an outline of our issue and what I did to solve. We had a custom Header module that we moved to a second domain. During that process, the main navigation menu didn't appear anymore. One of my teammates got the menu to appear eventually, but when we went to add child items, the dropdown function wasn't working.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Here is the code that set the menu for the original Header module:&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;{% set mainMenu = menu(widget_data.controls.change_header_main_menu) %}&lt;BR /&gt;&amp;lt;span class="hs-menu-wrapper"&amp;gt;&lt;BR /&gt;  &amp;lt;ul&amp;gt;&lt;BR /&gt;   {% for first in mainMenu.children %}&lt;/PRE&gt;&lt;P&gt;My teammate change it to:&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;{% menu id="{{ widget_data.Controls-1587388426226-11462845861796415.change_header_main_menu }}" %}        	
&amp;lt;span class="hs-menu-wrapper"&amp;gt;
 &amp;lt;ul&amp;gt;	
  {% for first in mainMenu.children %}&lt;/PRE&gt;&lt;P&gt;As you can see, they removed the "set" function in the code, which I discovered broke the "mainMenu" variable below&amp;nbsp; that controlled the child menu items.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;When I updated the second example to match the "set" example in the first module, I got an error because I can't have hyphens in the module name.&amp;nbsp; I cloned that controls module, renamed it, then updated the header module.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt; {% set mainMenu = menu(widget_data.Controls_JW.change_header_main_menu) %}        	
&amp;lt;span class="hs-menu-wrapper"&amp;gt;
  &amp;lt;ul&amp;gt;	
     {% for first in mainMenu.children %}&lt;/PRE&gt;&lt;P&gt;Now, the menu is still not working at this point.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Then I learned about "&lt;A href="https://developers.hubspot.com/docs/cms/building-blocks/modules/export-to-template-context" target="_blank" rel="noopener"&gt;export_to_template&lt;/A&gt;" and realized my next step. I needed to update the "additional head markup" and "Wrapping HTML" on my page template.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;So that's what I did. I added this code to my "Additional head markup"&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;{% module "Controls_JW" module_id="32648989754" label="Settings &amp;amp; Controls JW", no_wrapper=true, export_to_template_context=True %}&lt;/PRE&gt;&lt;P&gt;Then I clicked on my header module in the template, and added the below to the "Wrapping HTML" code section.&lt;/P&gt;&lt;PRE&gt;{{ widget_data.controls_JW.change_header_main_menu }}&lt;/PRE&gt;&lt;P&gt;And &lt;A href="https://portal.collabrance.com/test" target="_blank" rel="noopener"&gt;now it works!&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I'll leave the test page / example up. Note, anyone else won't be able to click on any links since the rest of the site needs registration to view.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Cheers!&lt;/P&gt;&lt;P&gt;John&lt;/P&gt;</description>
      <pubDate>Thu, 23 Jul 2020 15:02:26 GMT</pubDate>
      <guid>https://community.hubspot.com/t5/CMS-Development/Dropdown-Menu-Always-Visible/m-p/356839#M17678</guid>
      <dc:creator>jwiedenheft</dc:creator>
      <dc:date>2020-07-23T15:02:26Z</dc:date>
    </item>
  </channel>
</rss>

