<?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: Controlling the order of the blog tags on the blog list page in CMS Development</title>
    <link>https://community.hubspot.com/t5/CMS-Development/Controlling-the-order-of-the-blog-tags-on-the-blog-list-page/m-p/766985#M33244</link>
    <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.hubspot.com/t5/user/viewprofilepage/user-id/4546"&gt;@karen&lt;/a&gt;,&amp;nbsp;&lt;/P&gt;
&lt;P&gt;your devs are partially right.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If you're using the &lt;A href="https://developers.hubspot.com/docs/cms/hubl/functions#blog-tags" target="_blank" rel="noopener"&gt;blog_tag function&lt;/A&gt; the list is being generated dynamically and one of the few things you can do is apply a &lt;A href="https://developers.hubspot.com/docs/cms/hubl/filters#sort" target="_blank" rel="noopener"&gt;sort filter&lt;/A&gt;.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;BUT&lt;/STRONG&gt; an somehow easier way would be a pretty simple custom module. Just one (or two) text field(s) inside of a repeater. Also I recommend to make this module global.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;First add a text field and call it "Tag label", the second one is for the URL. So if you add a second text field, call it "URL". You can also add a Link or URL function if you want. The result will be the same. Also please keep in mind that the namings are up to you.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Once you've added both fields to the module the HTML+Hubl part is pretty simple&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;&amp;lt;div class="blogTagWrapper"&amp;gt;

&amp;lt;ul class="blogTags"&amp;gt;
{% for single_tag in module.blog_tags %}
&amp;lt;li class="singleBlogTag"&amp;gt;&amp;lt;a href="{{ single_tag.url }}"&amp;gt;{{ single_tag.tag_name }}&amp;lt;/a&amp;gt;&amp;lt;/li&amp;gt;
{% endfor %}
&amp;lt;/ul&amp;gt;

&amp;lt;/div&amp;gt;&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;What's left is to add the "plus" icon(either by CSS or you can add it directly to the code) and style it the way you would like to have it. After the styling is done you can place the module in the template and add your tags to it.&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>Fri, 10 Mar 2023 09:59:05 GMT</pubDate>
    <dc:creator>Anton</dc:creator>
    <dc:date>2023-03-10T09:59:05Z</dc:date>
    <item>
      <title>Controlling the order of the blog tags on the blog list page</title>
      <link>https://community.hubspot.com/t5/CMS-Development/Controlling-the-order-of-the-blog-tags-on-the-blog-list-page/m-p/766656#M33233</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;
&lt;P&gt;We recently did a rebuild of our website. The Creative Director wants the order of our tags reordered to reflect our areas of expertise at the beginning of the list from left to right.&lt;BR /&gt;See attached what currently exists.&lt;/P&gt;
&lt;P&gt;The Creative Director wants it changed to&lt;/P&gt;
&lt;P&gt;ALL+ CONSUMER FINANCE+ RETAIL+ MARKETING &amp;amp; DESIGN+ AGENCY &amp;amp; CULTURE+ OTHER+&lt;/P&gt;
&lt;P&gt;We asked our dev team if they could do this.&lt;/P&gt;
&lt;P&gt;They responded -&lt;BR /&gt;"We have checked this and unfortunately, we can't change the order of the Blog Tags Navigation because it's dynamic and displaying through the loop on the template level."&lt;/P&gt;
&lt;P&gt;Any ideas? Who else can we go to about this?&lt;/P&gt;</description>
      <pubDate>Thu, 09 Mar 2023 18:00:16 GMT</pubDate>
      <guid>https://community.hubspot.com/t5/CMS-Development/Controlling-the-order-of-the-blog-tags-on-the-blog-list-page/m-p/766656#M33233</guid>
      <dc:creator>karen</dc:creator>
      <dc:date>2023-03-09T18:00:16Z</dc:date>
    </item>
    <item>
      <title>Re: Controlling the order of the blog tags on the blog list page</title>
      <link>https://community.hubspot.com/t5/CMS-Development/Controlling-the-order-of-the-blog-tags-on-the-blog-list-page/m-p/766689#M33234</link>
      <description>&lt;P&gt;Hi,&amp;nbsp;&lt;a href="https://community.hubspot.com/t5/user/viewprofilepage/user-id/4546"&gt;@karen&lt;/a&gt;&amp;nbsp;Thanks for your question. Let's see if the community has any experience — hey&amp;nbsp;&lt;a href="https://community.hubspot.com/t5/user/viewprofilepage/user-id/17186"&gt;@Anton&lt;/a&gt;&amp;nbsp;&lt;a href="https://community.hubspot.com/t5/user/viewprofilepage/user-id/61659"&gt;@Stephanie-OG&lt;/a&gt;, do&amp;nbsp;you have any suggestions for&amp;nbsp;&lt;a href="https://community.hubspot.com/t5/user/viewprofilepage/user-id/4546"&gt;@karen&lt;/a&gt;?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thank you! — Jaycee&lt;/P&gt;</description>
      <pubDate>Thu, 09 Mar 2023 18:40:14 GMT</pubDate>
      <guid>https://community.hubspot.com/t5/CMS-Development/Controlling-the-order-of-the-blog-tags-on-the-blog-list-page/m-p/766689#M33234</guid>
      <dc:creator>Jaycee_Lewis</dc:creator>
      <dc:date>2023-03-09T18:40:14Z</dc:date>
    </item>
    <item>
      <title>Re: Controlling the order of the blog tags on the blog list page</title>
      <link>https://community.hubspot.com/t5/CMS-Development/Controlling-the-order-of-the-blog-tags-on-the-blog-list-page/m-p/766985#M33244</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.hubspot.com/t5/user/viewprofilepage/user-id/4546"&gt;@karen&lt;/a&gt;,&amp;nbsp;&lt;/P&gt;
&lt;P&gt;your devs are partially right.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If you're using the &lt;A href="https://developers.hubspot.com/docs/cms/hubl/functions#blog-tags" target="_blank" rel="noopener"&gt;blog_tag function&lt;/A&gt; the list is being generated dynamically and one of the few things you can do is apply a &lt;A href="https://developers.hubspot.com/docs/cms/hubl/filters#sort" target="_blank" rel="noopener"&gt;sort filter&lt;/A&gt;.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;BUT&lt;/STRONG&gt; an somehow easier way would be a pretty simple custom module. Just one (or two) text field(s) inside of a repeater. Also I recommend to make this module global.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;First add a text field and call it "Tag label", the second one is for the URL. So if you add a second text field, call it "URL". You can also add a Link or URL function if you want. The result will be the same. Also please keep in mind that the namings are up to you.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Once you've added both fields to the module the HTML+Hubl part is pretty simple&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;&amp;lt;div class="blogTagWrapper"&amp;gt;

&amp;lt;ul class="blogTags"&amp;gt;
{% for single_tag in module.blog_tags %}
&amp;lt;li class="singleBlogTag"&amp;gt;&amp;lt;a href="{{ single_tag.url }}"&amp;gt;{{ single_tag.tag_name }}&amp;lt;/a&amp;gt;&amp;lt;/li&amp;gt;
{% endfor %}
&amp;lt;/ul&amp;gt;

&amp;lt;/div&amp;gt;&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;What's left is to add the "plus" icon(either by CSS or you can add it directly to the code) and style it the way you would like to have it. After the styling is done you can place the module in the template and add your tags to it.&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>Fri, 10 Mar 2023 09:59:05 GMT</pubDate>
      <guid>https://community.hubspot.com/t5/CMS-Development/Controlling-the-order-of-the-blog-tags-on-the-blog-list-page/m-p/766985#M33244</guid>
      <dc:creator>Anton</dc:creator>
      <dc:date>2023-03-10T09:59:05Z</dc:date>
    </item>
    <item>
      <title>Re: Controlling the order of the blog tags on the blog list page</title>
      <link>https://community.hubspot.com/t5/CMS-Development/Controlling-the-order-of-the-blog-tags-on-the-blog-list-page/m-p/767028#M33247</link>
      <description>&lt;P&gt;&lt;a href="https://community.hubspot.com/t5/user/viewprofilepage/user-id/17186"&gt;@Anton&lt;/a&gt;'s solution works, but your developers can do this in the template to avoid creating a custom module:&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;{% set my_tags = blog_tags('default', 250) %}
{% set tagsOrder = [{'name':'Consumer finance', 'order':'2', 'url':''},{'name':'Retail', 'order':'3', 'url':''},{'name':'Marketing &amp;amp; design', 'order':'4', 'url':''},{'name':'Agency &amp;amp; culture', 'order':'5', 'url':''},{'name':'Other', 'order':'6', 'url':''}] %}
{% for item in my_tags %}
  {% for category in tagsOrder %}
    {% if item|lower == category.name|lower %}
      {% do category.update({'url': item.slug}) %}
    {% endif %}
  {% endfor %}
{% endfor %}

{# example implementation #}
&amp;lt;ul&amp;gt;
  &amp;lt;li&amp;gt;1: All, {{ group.absolute_url }}&amp;lt;/li&amp;gt;
  {% for item in tagsOrder|sort(False, False, 'order') %}
  &amp;lt;li&amp;gt;{{item.order}}: {{item.name}}, {{ blog_tag_url(group.id, item.url) }}&amp;lt;/li&amp;gt;
  {% endfor %}
&amp;lt;/ul&amp;gt;&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If you're translating your blog, it would have to be something like this:&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;{% set my_tags = blog_tags('default', 250) %}
{% set tagsOrder = [] %}
{% for item in my_tags %}
  {% if item is in ['Consumer finance','1st translation of Consumer finance','2nd translation of Consumer finance','3rd translation of Consumer finance'] %}
    {% do tagsOrder.append({'name':item, 'order':'2', 'url':item.slug}) %}
  {% elif item is in ['Retail','1st translation of Retail','2nd translation of Retail','3rd translation of Retail'] %}
    {% do tagsOrder.append({'name':item, 'order':'3', 'url':item.slug}) %}
  {% elif etc... %}

  {% endif %}
{% endfor %}

{# example implementation #}
{% set all = 'All' %}
{% if content.language.languageTag == 'de'}
  {% set all = 'Alle'}
{% endif %}
&amp;lt;ul&amp;gt;
  &amp;lt;li&amp;gt;1: {{all}}, {{ group.absolute_url }}&amp;lt;/li&amp;gt;
  {% for item in tagsOrder|sort(False, False, 'order') %}
  &amp;lt;li&amp;gt;{{item.order}}: {{item.name}}, {{ blog_tag_url(group.id, item.url) }}&amp;lt;/li&amp;gt;
  {% endfor %}
&amp;lt;/ul&amp;gt;&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 10 Mar 2023 11:30:44 GMT</pubDate>
      <guid>https://community.hubspot.com/t5/CMS-Development/Controlling-the-order-of-the-blog-tags-on-the-blog-list-page/m-p/767028#M33247</guid>
      <dc:creator>piersg</dc:creator>
      <dc:date>2023-03-10T11:30:44Z</dc:date>
    </item>
    <item>
      <title>Re: Controlling the order of the blog tags on the blog list page</title>
      <link>https://community.hubspot.com/t5/CMS-Development/Controlling-the-order-of-the-blog-tags-on-the-blog-list-page/m-p/767308#M33257</link>
      <description>&lt;P&gt;&lt;a href="https://community.hubspot.com/t5/user/viewprofilepage/user-id/127074"&gt;@Jaycee_Lewis&lt;/a&gt;.&amp;nbsp;&lt;a href="https://community.hubspot.com/t5/user/viewprofilepage/user-id/17186"&gt;@Anton&lt;/a&gt;,&amp;nbsp;&lt;a href="https://community.hubspot.com/t5/user/viewprofilepage/user-id/103660"&gt;@piersg&lt;/a&gt;&amp;nbsp;Thank you all for the helpful directions with detail! I have passed the information on to my development team.&lt;/P&gt;</description>
      <pubDate>Fri, 10 Mar 2023 19:51:11 GMT</pubDate>
      <guid>https://community.hubspot.com/t5/CMS-Development/Controlling-the-order-of-the-blog-tags-on-the-blog-list-page/m-p/767308#M33257</guid>
      <dc:creator>karen</dc:creator>
      <dc:date>2023-03-10T19:51:11Z</dc:date>
    </item>
    <item>
      <title>Re: Controlling the order of the blog tags on the blog list page</title>
      <link>https://community.hubspot.com/t5/CMS-Development/Controlling-the-order-of-the-blog-tags-on-the-blog-list-page/m-p/767310#M33258</link>
      <description>&lt;P&gt;Hey,&amp;nbsp;&lt;a href="https://community.hubspot.com/t5/user/viewprofilepage/user-id/4546"&gt;@karen&lt;/a&gt;! I'm glad it helped. We're pretty dang lucky to have folks like Anton and Piers to help us &lt;span class="lia-unicode-emoji" title=":smiling_face_with_smiling_eyes:"&gt;😊&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Have a wonderful weekend! — Jaycee&lt;/P&gt;</description>
      <pubDate>Fri, 10 Mar 2023 19:55:43 GMT</pubDate>
      <guid>https://community.hubspot.com/t5/CMS-Development/Controlling-the-order-of-the-blog-tags-on-the-blog-list-page/m-p/767310#M33258</guid>
      <dc:creator>Jaycee_Lewis</dc:creator>
      <dc:date>2023-03-10T19:55:43Z</dc:date>
    </item>
    <item>
      <title>Re: Controlling the order of the blog tags on the blog list page</title>
      <link>https://community.hubspot.com/t5/CMS-Development/Controlling-the-order-of-the-blog-tags-on-the-blog-list-page/m-p/767311#M33259</link>
      <description>&lt;P&gt;I could not agree more!&lt;/P&gt;</description>
      <pubDate>Fri, 10 Mar 2023 19:56:34 GMT</pubDate>
      <guid>https://community.hubspot.com/t5/CMS-Development/Controlling-the-order-of-the-blog-tags-on-the-blog-list-page/m-p/767311#M33259</guid>
      <dc:creator>karen</dc:creator>
      <dc:date>2023-03-10T19:56:34Z</dc:date>
    </item>
    <item>
      <title>Re: Controlling the order of the blog tags on the blog list page</title>
      <link>https://community.hubspot.com/t5/CMS-Development/Controlling-the-order-of-the-blog-tags-on-the-blog-list-page/m-p/994409#M39578</link>
      <description>&lt;P&gt;We should be able to just sort the existing tags, it wouldn't be a heavy workload for Hubspot.&lt;/P&gt;
&lt;P&gt;Once again a simple feature that isn't available.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;The suggested solutions aren't very praticial&lt;/P&gt;
&lt;P&gt;- the first one would require someone to know which tags are available &amp;amp; reduntantly recreate them in the repeater list..&lt;/P&gt;
&lt;P&gt;- the second solution would mean someone has to go inside the code to determine the order (not really client-user friendly).&lt;/P&gt;</description>
      <pubDate>Wed, 19 Jun 2024 12:48:40 GMT</pubDate>
      <guid>https://community.hubspot.com/t5/CMS-Development/Controlling-the-order-of-the-blog-tags-on-the-blog-list-page/m-p/994409#M39578</guid>
      <dc:creator>benvanlooy</dc:creator>
      <dc:date>2024-06-19T12:48:40Z</dc:date>
    </item>
  </channel>
</rss>

