<?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: Looping a HubL filter in CMS Development</title>
    <link>https://community.hubspot.com/t5/CMS-Development/Looping-a-HubL-filter/m-p/573703#M27326</link>
    <description>&lt;P&gt;Perfect, thank you&amp;nbsp;&lt;a href="https://community.hubspot.com/t5/user/viewprofilepage/user-id/250023"&gt;@Oezcan&lt;/a&gt;&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;</description>
    <pubDate>Thu, 10 Feb 2022 15:53:43 GMT</pubDate>
    <dc:creator>ben-duchy</dc:creator>
    <dc:date>2022-02-10T15:53:43Z</dc:date>
    <item>
      <title>Looping a HubL filter</title>
      <link>https://community.hubspot.com/t5/CMS-Development/Looping-a-HubL-filter/m-p/573616#M27324</link>
      <description>&lt;P&gt;Does anyone know a way how to loop a filter? Is it even possible?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I've been tasked with building an internal dashboard for my employer to show a variety of data from 30+ locations.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Each filter is complex, but essentially only has a couple of items changed (basic example below). Instead of hardcoding each filter, is it possible to loop it within the module so new filters can be added or removed within the page editor?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;{% set filter_london = table | selectattr ("city.name","equalto","London") | rejectattr ("plot_status.name","equalto","Reserved") %}

{% set filter_manchester = table | selectattr ("site.name","equalto","Manchester") | rejectattr ("plot_status.name","equalto","Reserved") %}

{% set filter_glasgow = table | selectattr ("city.name","equalto","Glasgow") | rejectattr ("plot_status.name","equalto","Reserved") %}&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 10 Feb 2022 14:53:35 GMT</pubDate>
      <guid>https://community.hubspot.com/t5/CMS-Development/Looping-a-HubL-filter/m-p/573616#M27324</guid>
      <dc:creator>ben-duchy</dc:creator>
      <dc:date>2022-02-10T14:53:35Z</dc:date>
    </item>
    <item>
      <title>Re: Looping a HubL filter</title>
      <link>https://community.hubspot.com/t5/CMS-Development/Looping-a-HubL-filter/m-p/573692#M27325</link>
      <description>&lt;P&gt;Hello&amp;nbsp;&lt;a href="https://community.hubspot.com/t5/user/viewprofilepage/user-id/60000"&gt;@ben-duchy&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;of course it is possible &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;as my solution I would like to link two pages where you will definitely find a solution to your case.&lt;BR /&gt;&lt;A href="https://developers.hubspot.com/docs/cms/hubl/filters" target="_blank" rel="noopener"&gt;Click here&lt;/A&gt; for the filters supported by HubL. You might want to use one.&lt;/P&gt;
&lt;P&gt;&lt;A href="https://developers.hubspot.com/docs/cms/hubl/for-loops" target="_blank" rel="noopener"&gt;Click here&lt;/A&gt; for the loops.&lt;BR /&gt;And for your case I think you will need this loop.&lt;/P&gt;
&lt;P&gt;&lt;A href="https://developers.hubspot.com/docs/cms/hubl/for-loops#key-value-pairs-in-loops" target="_blank" rel="noopener"&gt;Click here&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I hope I could help, best regards,&lt;/P&gt;
&lt;P&gt;Özcan&lt;/P&gt;</description>
      <pubDate>Thu, 10 Feb 2022 15:47:20 GMT</pubDate>
      <guid>https://community.hubspot.com/t5/CMS-Development/Looping-a-HubL-filter/m-p/573692#M27325</guid>
      <dc:creator>Oezcan</dc:creator>
      <dc:date>2022-02-10T15:47:20Z</dc:date>
    </item>
    <item>
      <title>Re: Looping a HubL filter</title>
      <link>https://community.hubspot.com/t5/CMS-Development/Looping-a-HubL-filter/m-p/573703#M27326</link>
      <description>&lt;P&gt;Perfect, thank you&amp;nbsp;&lt;a href="https://community.hubspot.com/t5/user/viewprofilepage/user-id/250023"&gt;@Oezcan&lt;/a&gt;&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 10 Feb 2022 15:53:43 GMT</pubDate>
      <guid>https://community.hubspot.com/t5/CMS-Development/Looping-a-HubL-filter/m-p/573703#M27326</guid>
      <dc:creator>ben-duchy</dc:creator>
      <dc:date>2022-02-10T15:53:43Z</dc:date>
    </item>
  </channel>
</rss>

