<?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: Get blog post ID (unique identifier) in for content in contents loop on Blog Listing Page in CMS Development</title>
    <link>https://community.hubspot.com/t5/CMS-Development/Get-blog-post-ID-unique-identifier-in-for-content-in-contents/m-p/217552#M9798</link>
    <description>&lt;P&gt;Thanks so much for the cc&amp;nbsp;&lt;a href="https://community.hubspot.com/t5/user/viewprofilepage/user-id/13982"&gt;@dennisedson&lt;/a&gt;. We'll try to be more explicit about this when those docs get polished up, but you'll be happy to hear that I was writing about this exact topic in my script for the new CMS for Developers lesson covering blog markup.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;a href="https://community.hubspot.com/t5/user/viewprofilepage/user-id/59154"&gt;@jmarcello&lt;/a&gt;&amp;nbsp;I was honestly not sure how explicit to be about this&amp;nbsp;potential point of confusion and your post here is a great gut check. So thanks to both of you and let me know if I can help clarify anything. To some degree this is just a fundamental aspect of looping through dictionaries with a for loop, but it doesn't help that a) we never really explicitly say that's what's happening and b) we use "content" and "contents". I wonder if you have any opinions about whether using "post in contents" in my examples would help clarify. Either way, thanks for the insight into your workflow.&lt;/P&gt;</description>
    <pubDate>Mon, 19 Nov 2018 23:13:14 GMT</pubDate>
    <dc:creator>jausura</dc:creator>
    <dc:date>2018-11-19T23:13:14Z</dc:date>
    <item>
      <title>Get blog post ID (unique identifier) in for content in contents loop on Blog Listing Page</title>
      <link>https://community.hubspot.com/t5/CMS-Development/Get-blog-post-ID-unique-identifier-in-for-content-in-contents/m-p/216631#M9707</link>
      <description>&lt;P&gt;Hi:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Support suggest this variable to get the blog post ID (as a unique identifier):&lt;BR /&gt;&lt;BR /&gt;&lt;STRONG&gt;{{ content_id }}&lt;/STRONG&gt;&lt;BR /&gt;&lt;BR /&gt;This works great when working in the &lt;STRONG&gt;Blog Post page template&lt;/STRONG&gt;.&lt;BR /&gt;&lt;BR /&gt;It does not seem to work when I add it to the &lt;STRONG&gt;for content in contents&lt;/STRONG&gt; loop on my &lt;STRONG&gt;Blog Listings Page template.&lt;/STRONG&gt;&lt;BR /&gt;&lt;BR /&gt;For example, my loop might look like this:&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;PRE&gt;       &amp;lt;!-- Start Hubspot / Hubl loop here to display blog posts --&amp;gt;
        &amp;lt;div class="row"&amp;gt;
          {% for content in contents %}
          &amp;lt;div id="{{ content_id }}" class="post_box column one_third"&amp;gt;
            &amp;lt;article&amp;gt;
              &amp;lt;div class="box"&amp;gt;
                &amp;lt;div class="inside"&amp;gt;
                  &amp;lt;div class="thumbnail"&amp;gt;
                    &amp;lt;a href="{{content.absolute_url}}"&amp;gt;
                      &amp;lt;img width="480" height="270" src="{{ content.featured_image }}" class="flex" alt="{{ content.featured_image_alt_text }}"&amp;gt;
                    &amp;lt;/a&amp;gt;
                  &amp;lt;/div&amp;gt;
                &amp;lt;/div&amp;gt;
              &amp;lt;/div&amp;gt;
            &amp;lt;/article&amp;gt;
          &amp;lt;/div&amp;gt;
          {% endfor %}
        &amp;lt;/div&amp;gt;
        &amp;lt;!-- End Hubspot / Hubl loop here to display blog posts --&amp;gt;&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Ideally, if I was showing 6 blog posts on my &lt;STRONG&gt;blog post listings page&lt;/STRONG&gt;, each one would have a unique identifier set as a&amp;nbsp;&lt;STRONG&gt;CSS ID&lt;/STRONG&gt; by getting and printing the value of &lt;STRONG&gt;{{ content_id}}&amp;nbsp;&lt;/STRONG&gt;as the code implies aboves.&lt;BR /&gt;&lt;BR /&gt;&lt;STRONG&gt;How can I achieve this in a for loop on my blog listings page?&lt;/STRONG&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 14 Nov 2018 23:28:14 GMT</pubDate>
      <guid>https://community.hubspot.com/t5/CMS-Development/Get-blog-post-ID-unique-identifier-in-for-content-in-contents/m-p/216631#M9707</guid>
      <dc:creator>jmarcello</dc:creator>
      <dc:date>2018-11-14T23:28:14Z</dc:date>
    </item>
    <item>
      <title>Re: Get blog post ID (unique identifier) in for content in contents loop on Blog Listing Page</title>
      <link>https://community.hubspot.com/t5/CMS-Development/Get-blog-post-ID-unique-identifier-in-for-content-in-contents/m-p/216636#M9708</link>
      <description>&lt;P&gt;&lt;a href="https://community.hubspot.com/t5/user/viewprofilepage/user-id/59154"&gt;@jmarcello&lt;/a&gt;,&amp;nbsp;try&amp;nbsp;{{ content.id }}&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 15 Nov 2018 00:57:18 GMT</pubDate>
      <guid>https://community.hubspot.com/t5/CMS-Development/Get-blog-post-ID-unique-identifier-in-for-content-in-contents/m-p/216636#M9708</guid>
      <dc:creator>dennisedson</dc:creator>
      <dc:date>2018-11-15T00:57:18Z</dc:date>
    </item>
    <item>
      <title>Re: Get blog post ID (unique identifier) in for content in contents loop on Blog Listing Page</title>
      <link>https://community.hubspot.com/t5/CMS-Development/Get-blog-post-ID-unique-identifier-in-for-content-in-contents/m-p/216828#M9725</link>
      <description>&lt;P&gt;Thanks...that worked. It would be helpful if that was documented, also some explanation as to what an alias is.&lt;/P&gt;</description>
      <pubDate>Thu, 15 Nov 2018 16:38:35 GMT</pubDate>
      <guid>https://community.hubspot.com/t5/CMS-Development/Get-blog-post-ID-unique-identifier-in-for-content-in-contents/m-p/216828#M9725</guid>
      <dc:creator>jmarcello</dc:creator>
      <dc:date>2018-11-15T16:38:35Z</dc:date>
    </item>
    <item>
      <title>Re: Get blog post ID (unique identifier) in for content in contents loop on Blog Listing Page</title>
      <link>https://community.hubspot.com/t5/CMS-Development/Get-blog-post-ID-unique-identifier-in-for-content-in-contents/m-p/217523#M9792</link>
      <description>&lt;P&gt;&lt;a href="https://community.hubspot.com/t5/user/viewprofilepage/user-id/59154"&gt;@jmarcello&lt;/a&gt;, i believe&amp;nbsp; there is a big push to get all the documentation sparkling clean.&amp;nbsp;&lt;/P&gt;&lt;P&gt;cc: &lt;a href="https://community.hubspot.com/t5/user/viewprofilepage/user-id/43024"&gt;@jausura&lt;/a&gt;&lt;/P&gt;&lt;DIV class="UserAvatar lia-user-avatar lia-component-common-widget-user-avatar lia-component-user-avatar"&gt;&amp;nbsp;&lt;/DIV&gt;</description>
      <pubDate>Mon, 19 Nov 2018 19:51:45 GMT</pubDate>
      <guid>https://community.hubspot.com/t5/CMS-Development/Get-blog-post-ID-unique-identifier-in-for-content-in-contents/m-p/217523#M9792</guid>
      <dc:creator>dennisedson</dc:creator>
      <dc:date>2018-11-19T19:51:45Z</dc:date>
    </item>
    <item>
      <title>Re: Get blog post ID (unique identifier) in for content in contents loop on Blog Listing Page</title>
      <link>https://community.hubspot.com/t5/CMS-Development/Get-blog-post-ID-unique-identifier-in-for-content-in-contents/m-p/217552#M9798</link>
      <description>&lt;P&gt;Thanks so much for the cc&amp;nbsp;&lt;a href="https://community.hubspot.com/t5/user/viewprofilepage/user-id/13982"&gt;@dennisedson&lt;/a&gt;. We'll try to be more explicit about this when those docs get polished up, but you'll be happy to hear that I was writing about this exact topic in my script for the new CMS for Developers lesson covering blog markup.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;a href="https://community.hubspot.com/t5/user/viewprofilepage/user-id/59154"&gt;@jmarcello&lt;/a&gt;&amp;nbsp;I was honestly not sure how explicit to be about this&amp;nbsp;potential point of confusion and your post here is a great gut check. So thanks to both of you and let me know if I can help clarify anything. To some degree this is just a fundamental aspect of looping through dictionaries with a for loop, but it doesn't help that a) we never really explicitly say that's what's happening and b) we use "content" and "contents". I wonder if you have any opinions about whether using "post in contents" in my examples would help clarify. Either way, thanks for the insight into your workflow.&lt;/P&gt;</description>
      <pubDate>Mon, 19 Nov 2018 23:13:14 GMT</pubDate>
      <guid>https://community.hubspot.com/t5/CMS-Development/Get-blog-post-ID-unique-identifier-in-for-content-in-contents/m-p/217552#M9798</guid>
      <dc:creator>jausura</dc:creator>
      <dc:date>2018-11-19T23:13:14Z</dc:date>
    </item>
  </channel>
</rss>

