<?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: Display only 1 tag on blog index card instead of multiple in CMS Development</title>
    <link>https://community.hubspot.com/t5/CMS-Development/Display-only-1-tag-on-blog-index-card-instead-of-multiple/m-p/496629#M25155</link>
    <description>&lt;P&gt;My current code is:&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;&amp;lt;div class="category"&amp;gt;&lt;BR /&gt;{% for topic in content.topic_list %}&lt;BR /&gt;&amp;lt;a href="{{ topic.slug }}" class="topic-link"&amp;gt;{{ topic.name }}&amp;lt;/a&amp;gt;&lt;BR /&gt;{% endfor %}&lt;BR /&gt;&amp;lt;/div&amp;gt;&lt;/P&gt;</description>
    <pubDate>Fri, 17 Sep 2021 19:37:31 GMT</pubDate>
    <dc:creator>jwill377</dc:creator>
    <dc:date>2021-09-17T19:37:31Z</dc:date>
    <item>
      <title>Display only 1 tag on blog index card instead of multiple</title>
      <link>https://community.hubspot.com/t5/CMS-Development/Display-only-1-tag-on-blog-index-card-instead-of-multiple/m-p/496624#M25152</link>
      <description>&lt;P&gt;How would I go about having only 1 tag listed on each blog post card on the index page instead of having multiple tags displaying?&lt;/P&gt;</description>
      <pubDate>Fri, 17 Sep 2021 19:24:00 GMT</pubDate>
      <guid>https://community.hubspot.com/t5/CMS-Development/Display-only-1-tag-on-blog-index-card-instead-of-multiple/m-p/496624#M25152</guid>
      <dc:creator>jwill377</dc:creator>
      <dc:date>2021-09-17T19:24:00Z</dc:date>
    </item>
    <item>
      <title>Re: Display only 1 tag on blog index card instead of multiple</title>
      <link>https://community.hubspot.com/t5/CMS-Development/Display-only-1-tag-on-blog-index-card-instead-of-multiple/m-p/496627#M25154</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.hubspot.com/t5/user/viewprofilepage/user-id/248030"&gt;@jwill377&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Could you share a bit of your current code so we can tweak it?&lt;BR /&gt;You could do something like this:&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;{% set firstTopic = content.topic_list[0] %}

{{firstTopic.name}} // Will show the name of the first topic only.&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 17 Sep 2021 19:35:50 GMT</pubDate>
      <guid>https://community.hubspot.com/t5/CMS-Development/Display-only-1-tag-on-blog-index-card-instead-of-multiple/m-p/496627#M25154</guid>
      <dc:creator>Teun</dc:creator>
      <dc:date>2021-09-17T19:35:50Z</dc:date>
    </item>
    <item>
      <title>Re: Display only 1 tag on blog index card instead of multiple</title>
      <link>https://community.hubspot.com/t5/CMS-Development/Display-only-1-tag-on-blog-index-card-instead-of-multiple/m-p/496629#M25155</link>
      <description>&lt;P&gt;My current code is:&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;&amp;lt;div class="category"&amp;gt;&lt;BR /&gt;{% for topic in content.topic_list %}&lt;BR /&gt;&amp;lt;a href="{{ topic.slug }}" class="topic-link"&amp;gt;{{ topic.name }}&amp;lt;/a&amp;gt;&lt;BR /&gt;{% endfor %}&lt;BR /&gt;&amp;lt;/div&amp;gt;&lt;/P&gt;</description>
      <pubDate>Fri, 17 Sep 2021 19:37:31 GMT</pubDate>
      <guid>https://community.hubspot.com/t5/CMS-Development/Display-only-1-tag-on-blog-index-card-instead-of-multiple/m-p/496629#M25155</guid>
      <dc:creator>jwill377</dc:creator>
      <dc:date>2021-09-17T19:37:31Z</dc:date>
    </item>
    <item>
      <title>Re: Display only 1 tag on blog index card instead of multiple</title>
      <link>https://community.hubspot.com/t5/CMS-Development/Display-only-1-tag-on-blog-index-card-instead-of-multiple/m-p/496630#M25156</link>
      <description>&lt;P&gt;Two solutions to handle this:&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;&amp;lt;div class="category"&amp;gt;
  {% for topic in content.topic_list %}
    {% if loop.first %}
      &amp;lt;a href="{{ topic.slug }}" class="topic-link"&amp;gt;{{ topic.name }}&amp;lt;/a&amp;gt;
    {% endif %}
  {% endfor %}
&amp;lt;/div&amp;gt;&lt;/LI-CODE&gt;
&lt;P&gt;Second option:&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;&amp;lt;div class="category"&amp;gt;
  {% set firstTopic = content.topic_list[0] %}
  {% if firstTopic %}
    &amp;lt;a href="{{ firstTopic.slug }}" class="topic-link"&amp;gt;{{ firstTopic.name }}&amp;lt;/a&amp;gt;
  {% endif %}
&amp;lt;/div&amp;gt;&lt;/LI-CODE&gt;</description>
      <pubDate>Fri, 17 Sep 2021 19:40:26 GMT</pubDate>
      <guid>https://community.hubspot.com/t5/CMS-Development/Display-only-1-tag-on-blog-index-card-instead-of-multiple/m-p/496630#M25156</guid>
      <dc:creator>Teun</dc:creator>
      <dc:date>2021-09-17T19:40:26Z</dc:date>
    </item>
    <item>
      <title>Re: Display only 1 tag on blog index card instead of multiple</title>
      <link>https://community.hubspot.com/t5/CMS-Development/Display-only-1-tag-on-blog-index-card-instead-of-multiple/m-p/496632#M25157</link>
      <description>&lt;P&gt;The second option works great! Thank you so much!!&lt;/P&gt;</description>
      <pubDate>Fri, 17 Sep 2021 19:42:49 GMT</pubDate>
      <guid>https://community.hubspot.com/t5/CMS-Development/Display-only-1-tag-on-blog-index-card-instead-of-multiple/m-p/496632#M25157</guid>
      <dc:creator>jwill377</dc:creator>
      <dc:date>2021-09-17T19:42:49Z</dc:date>
    </item>
  </channel>
</rss>

