<?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: Modal popup in CMS Development</title>
    <link>https://community.hubspot.com/t5/CMS-Development/Modal-popup/m-p/395815#M20256</link>
    <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.hubspot.com/t5/user/viewprofilepage/user-id/154488"&gt;@dobradovic&lt;/a&gt;,&amp;nbsp;&lt;/P&gt;
&lt;P&gt;you can either upload the file into the file-manager or the design-manager or set it up directly in the desired page or page-wide settings(settings-&amp;gt;website-&amp;gt;pages-&amp;gt;website-header).&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If you upload it into the file-manager you can load it via your page settings(settings-website-pages) or in your template. Personally I don't recomend this because it will have an impact on page speed because you'll load the script even if you don't use the module/function.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If you upload it to the design-manager you can load it via your module(right sidebar of the module). If you go this way the benefit would be that your css/js file(s) would only load if you use this module. And only once(even if you use the module multiple times on a single page).&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Tipp: If you want to give the user(the one who will use this module) the option to enable or disable the popup function in each module you could do something like this in the HTML+Hubl section of your module:&lt;/P&gt;
&lt;P&gt;- create a boolean function in your module(I've called mine "enable Lightbox") and write your code something like this&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;&amp;lt;img src="{module.your_IMG.src}" class="{% if module.enable_lightbox%}lightboxclass{% endif %}"&amp;gt;


{% if module.enable_lightbox%}
{{require_js("Link-to-your-js","footer")}}
{{require_css("Link-to-your-css")}}
{% endif %}
&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;here some links how to use the required_options:&lt;/P&gt;
&lt;P&gt;&lt;A href="https://developers.hubspot.com/docs/cms/hubl/functions#require-css" target="_blank" rel="noopener"&gt;require CSS&lt;/A&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;A href="https://developers.hubspot.com/docs/cms/hubl/functions#require-js" target="_blank" rel="noopener"&gt;require JS&lt;/A&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;best,&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Anton&lt;/P&gt;</description>
    <pubDate>Mon, 28 Dec 2020 14:03:00 GMT</pubDate>
    <dc:creator>Anton</dc:creator>
    <dc:date>2020-12-28T14:03:00Z</dc:date>
    <item>
      <title>Modal popup</title>
      <link>https://community.hubspot.com/t5/CMS-Development/Modal-popup/m-p/395727#M20246</link>
      <description>&lt;P&gt;What is best way to create modal popup on click on image or text?&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 25 Dec 2020 10:59:50 GMT</pubDate>
      <guid>https://community.hubspot.com/t5/CMS-Development/Modal-popup/m-p/395727#M20246</guid>
      <dc:creator>dobradovic</dc:creator>
      <dc:date>2020-12-25T10:59:50Z</dc:date>
    </item>
    <item>
      <title>Re: Modal popup</title>
      <link>https://community.hubspot.com/t5/CMS-Development/Modal-popup/m-p/395772#M20252</link>
      <description>&lt;P&gt;Hello&amp;nbsp;&lt;a href="https://community.hubspot.com/t5/user/viewprofilepage/user-id/154488"&gt;@dobradovic&lt;/a&gt;,&lt;/P&gt;
&lt;P&gt;an easy way for modal boxes is a custom module with bootstrap4.&lt;/P&gt;
&lt;P&gt;&lt;A href="https://getbootstrap.com/docs/4.0/components/modal/" target="_blank"&gt;https://getbootstrap.com/docs/4.0/components/modal/&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;Load in the CDN of JS and CSS.&lt;/P&gt;
&lt;P&gt;Start a Custom Module and put in the code of the bootstrap page.&lt;BR /&gt;This should give you an good example of the Modal Box.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;- Chris&lt;/P&gt;</description>
      <pubDate>Mon, 28 Dec 2020 00:27:01 GMT</pubDate>
      <guid>https://community.hubspot.com/t5/CMS-Development/Modal-popup/m-p/395772#M20252</guid>
      <dc:creator>Chris-M</dc:creator>
      <dc:date>2020-12-28T00:27:01Z</dc:date>
    </item>
    <item>
      <title>Re: Modal popup</title>
      <link>https://community.hubspot.com/t5/CMS-Development/Modal-popup/m-p/395806#M20254</link>
      <description>&lt;P&gt;Hi, tnx for answer. Where should I load in the CDN of JS and CSS? Im very new to hubspot. Should I load this in custom module somewhere or?&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Tnx &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 28 Dec 2020 13:07:38 GMT</pubDate>
      <guid>https://community.hubspot.com/t5/CMS-Development/Modal-popup/m-p/395806#M20254</guid>
      <dc:creator>dobradovic</dc:creator>
      <dc:date>2020-12-28T13:07:38Z</dc:date>
    </item>
    <item>
      <title>Re: Modal popup</title>
      <link>https://community.hubspot.com/t5/CMS-Development/Modal-popup/m-p/395815#M20256</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.hubspot.com/t5/user/viewprofilepage/user-id/154488"&gt;@dobradovic&lt;/a&gt;,&amp;nbsp;&lt;/P&gt;
&lt;P&gt;you can either upload the file into the file-manager or the design-manager or set it up directly in the desired page or page-wide settings(settings-&amp;gt;website-&amp;gt;pages-&amp;gt;website-header).&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If you upload it into the file-manager you can load it via your page settings(settings-website-pages) or in your template. Personally I don't recomend this because it will have an impact on page speed because you'll load the script even if you don't use the module/function.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If you upload it to the design-manager you can load it via your module(right sidebar of the module). If you go this way the benefit would be that your css/js file(s) would only load if you use this module. And only once(even if you use the module multiple times on a single page).&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Tipp: If you want to give the user(the one who will use this module) the option to enable or disable the popup function in each module you could do something like this in the HTML+Hubl section of your module:&lt;/P&gt;
&lt;P&gt;- create a boolean function in your module(I've called mine "enable Lightbox") and write your code something like this&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;&amp;lt;img src="{module.your_IMG.src}" class="{% if module.enable_lightbox%}lightboxclass{% endif %}"&amp;gt;


{% if module.enable_lightbox%}
{{require_js("Link-to-your-js","footer")}}
{{require_css("Link-to-your-css")}}
{% endif %}
&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;here some links how to use the required_options:&lt;/P&gt;
&lt;P&gt;&lt;A href="https://developers.hubspot.com/docs/cms/hubl/functions#require-css" target="_blank" rel="noopener"&gt;require CSS&lt;/A&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;A href="https://developers.hubspot.com/docs/cms/hubl/functions#require-js" target="_blank" rel="noopener"&gt;require JS&lt;/A&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;best,&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Anton&lt;/P&gt;</description>
      <pubDate>Mon, 28 Dec 2020 14:03:00 GMT</pubDate>
      <guid>https://community.hubspot.com/t5/CMS-Development/Modal-popup/m-p/395815#M20256</guid>
      <dc:creator>Anton</dc:creator>
      <dc:date>2020-12-28T14:03:00Z</dc:date>
    </item>
  </channel>
</rss>

