<?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: Adding Blog Posts w/ Pagination To Website Page in CMS Development</title>
    <link>https://community.hubspot.com/t5/CMS-Development/Adding-Blog-Posts-w-Pagination-To-Website-Page/m-p/619067#M28397</link>
    <description>&lt;P&gt;&lt;a href="https://community.hubspot.com/t5/user/viewprofilepage/user-id/371118"&gt;@eslobrown&lt;/a&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;In my opinion, the best way to tackle this is by using &lt;A href="https://css-tricks.com/snippets/css/a-guide-to-flexbox/" target="_blank" rel="noopener"&gt;css's flex rule&lt;/A&gt;.&lt;/P&gt;
&lt;P&gt;Here is what I would add (for desktop, you would make changes as you reduce screen size&lt;/P&gt;
&lt;P&gt;On the container:&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;.overlapping-div-container {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 10px;
   }&lt;/LI-CODE&gt;
&lt;P&gt;on the items:&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;.overlapping-div-container .span6 {
  width: calc(50% - 1rem);
  margin: 0;
  background: #fff;
}&lt;/LI-CODE&gt;
&lt;P&gt;This is how it looks for me with that code:&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Firefox_Developer_Edition.png" style="width: 400px;"&gt;&lt;img src="https://community.hubspot.com/t5/image/serverpage/image-id/64524i2ED325457729BC19/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Firefox_Developer_Edition.png" alt="Firefox_Developer_Edition.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;and style away &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;
&lt;P&gt; &lt;/P&gt;</description>
    <pubDate>Wed, 20 Apr 2022 17:03:23 GMT</pubDate>
    <dc:creator>dennisedson</dc:creator>
    <dc:date>2022-04-20T17:03:23Z</dc:date>
    <item>
      <title>Adding Blog Posts w/ Pagination To Website Page</title>
      <link>https://community.hubspot.com/t5/CMS-Development/Adding-Blog-Posts-w-Pagination-To-Website-Page/m-p/618292#M28374</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am looking to add at least 4 featured blog posts from a specific tag/category to a website page. I have a module for this but I have two issues:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;1. Blog posts 1 and 2 appear horizontally, next to each other. When I increase the number of blog posts from the default of 2 to 4, blog post 3 appears indented under post 1, and blog post 4 appears under post 3. What I'd like to see is blog post 3 appear without the indent under post 1 and post 4 appear directly under post 2.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;2. How do I add pagination so that&amp;nbsp; users can see additional posts within that category? I want 4 posts to be featured on that page but want the user to be able to see all available posts.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Below is the my current module code. Any help would be greatly appreciated.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;lt;div class="overlapping-div-wrapper" style="background-color: rgba({{ module.overlapping_bg_color.color|convert_rgb }},{{ module.overlapping_bg_color.opacity/100 }});"&amp;gt;&lt;BR /&gt;&amp;lt;div class="container"&amp;gt;&lt;BR /&gt;&amp;lt;div&amp;gt;&lt;BR /&gt;&amp;lt;h2 class="overlapping-div-title-white"&amp;gt;&lt;BR /&gt;{{ module.heading }}&lt;BR /&gt;&amp;lt;/h2&amp;gt;&lt;BR /&gt;&amp;lt;/div&amp;gt;&lt;BR /&gt;&amp;lt;div class="overlapping-div-container"&amp;gt;&lt;BR /&gt;{% if module.multiple_tags %}&lt;BR /&gt;{% set posts = blog_recent_tag_posts('44639786360', [module.tag_field, module.tag_2], 2) %}&lt;BR /&gt;{% else %}&lt;BR /&gt;{% set posts = blog_recent_tag_posts('44639786360', [module.tag_field], 3) %}&lt;BR /&gt;{% endif %}&lt;BR /&gt;{% for post in posts %}&lt;BR /&gt;&amp;lt;div class="span6"&amp;gt;&lt;BR /&gt;{% if post.featured_image %}&lt;BR /&gt;&amp;lt;div class="overlapping-div-image-2" style="background-image:url('{{ post.featured_image }}');"&amp;gt;&lt;BR /&gt;&amp;lt;/div&amp;gt;&lt;BR /&gt;{% else %}&lt;BR /&gt;&amp;lt;div class="overlapping-div-image-2" style="background-image:url('{{ module.generic_image.src }}');"&amp;gt;&lt;BR /&gt;&amp;lt;/div&amp;gt;&lt;BR /&gt;{% endif %}&lt;BR /&gt;&amp;lt;div class="overlapping-div-text-2"&amp;gt;&lt;BR /&gt;&amp;lt;a href="{{ post.absolute_url }}"&amp;gt;&amp;lt;h3&amp;gt;{{ post.name }}&amp;lt;/h3&amp;gt;&amp;lt;/a&amp;gt;&lt;BR /&gt;&amp;lt;p style="margin-bottom: 40px!important;"&amp;gt;{{ post.post_list_content|striptags|truncate(150, breakword=False, end='...') }}&amp;lt;/p&amp;gt;&lt;BR /&gt;&amp;lt;a class="related_blogs_cta" href="{{post.absolute_url}}"&amp;gt;Read More&amp;lt;/a&amp;gt;&lt;BR /&gt;&amp;lt;/div&amp;gt;&lt;BR /&gt;&amp;lt;/div&amp;gt;&lt;BR /&gt;{% endfor %}&lt;BR /&gt;&amp;lt;/div&amp;gt;&lt;BR /&gt;&amp;lt;/div&amp;gt;&lt;BR /&gt;&amp;lt;/div&amp;gt;&lt;/P&gt;&lt;P&gt;&amp;lt;style&amp;gt;&lt;BR /&gt;.overlapping-div-title-white {&lt;BR /&gt;color: #fff;&lt;BR /&gt;margin-bottom: 40px;&lt;BR /&gt;}&lt;BR /&gt;.overlapping-div-wrapper{&lt;BR /&gt;padding: 120px 0 180px;&lt;BR /&gt;}&lt;BR /&gt;.overlapping-div-container {&lt;BR /&gt;margin-bottom: -40px;&lt;BR /&gt;}&lt;BR /&gt;.overlapping-div-image-2 {&lt;BR /&gt;background-size: cover;&lt;BR /&gt;background-position: center;&lt;BR /&gt;height: 300px;&lt;BR /&gt;width: 100%;&lt;BR /&gt;border: solid 1px #8b92a7;&lt;BR /&gt;}&lt;BR /&gt;.overlapping-div-text-2{&lt;BR /&gt;margin: 20px auto;&lt;BR /&gt;}&lt;BR /&gt;.overlapping-div-text-2 a:hover, .overlapping-div-text-2 a:active, .overlapping-div-text-2 a:focus{&lt;BR /&gt;text-decoration: none!important;&lt;BR /&gt;}&lt;BR /&gt;.overalapping-div-link {&lt;BR /&gt;height: 200px;&lt;BR /&gt;width: 100%;&lt;BR /&gt;background-color: #00000066;&lt;BR /&gt;opacity: 0;&lt;BR /&gt;transition: all 200ms linear;&lt;BR /&gt;justify-content: center;&lt;BR /&gt;display: flex;&lt;BR /&gt;align-items: center;&lt;BR /&gt;}&lt;BR /&gt;.overalapping-div-link a {&lt;BR /&gt;padding: 9px 20px;&lt;BR /&gt;border: solid 2px #fff;&lt;BR /&gt;background-color: none;&lt;BR /&gt;color: #fff;&lt;BR /&gt;text-transform:uppercase;&lt;BR /&gt;transition: all 200ms linear;&lt;BR /&gt;opacity: 0;&lt;BR /&gt;border-radius: 3px;&lt;BR /&gt;}&lt;BR /&gt;.overalapping-div-link:hover, .overalapping-div-link:hover a {&lt;BR /&gt;opacity:1;&lt;BR /&gt;}&lt;BR /&gt;.overalapping-div-link:hover a:hover {&lt;BR /&gt;background-color: #fff;&lt;BR /&gt;color: #ef424a;&lt;BR /&gt;opacity: 1;&lt;BR /&gt;text-decoration: none;&lt;BR /&gt;}&lt;BR /&gt;&lt;BR /&gt;.related_blogs_cta {&lt;BR /&gt;background-color: #ef424a;&lt;BR /&gt;border: solid 1px #ef424a;&lt;BR /&gt;border-radius: 3px;&lt;BR /&gt;padding: 9px 20px;&lt;BR /&gt;color:#fff;&lt;BR /&gt;text-transform: uppercase;&lt;BR /&gt;transition: linear all 200ms;&lt;BR /&gt;}&lt;BR /&gt;.related_blogs_cta:hover,&lt;BR /&gt;.related_blogs_cta:focus,&lt;BR /&gt;.related_blogs_cta a:hover,&lt;BR /&gt;.related_blogs_cta a:focus {&lt;BR /&gt;background-color: #fff!important;&lt;BR /&gt;color: #ef424a!important;&lt;BR /&gt;text-decoration: none!important;&lt;BR /&gt;}&lt;BR /&gt;&lt;a href="https://community.hubspot.com/t5/user/viewprofilepage/user-id/83477"&gt;@media&lt;/a&gt; (max-width: 767px){&lt;BR /&gt;.overlapping-div-title {&lt;BR /&gt;margin: auto 0 40px;&lt;BR /&gt;}&lt;BR /&gt;.overlapping-div-container {&lt;BR /&gt;margin-bottom: 0;&lt;BR /&gt;}&lt;BR /&gt;.overlapping-div-wrapper{&lt;BR /&gt;padding: 80px 0;&lt;BR /&gt;}&lt;BR /&gt;.overlapping-div-text-2, .overlapping-div-text-2 h3, .overlapping-div-text-2 h3 a, .overlapping-div-text-2 p {&lt;BR /&gt;color: #fff;&lt;BR /&gt;}&lt;BR /&gt;.overalapping-div-link:hover, .overalapping-div-link:hover a {&lt;BR /&gt;opacity:0;&lt;BR /&gt;}&lt;BR /&gt;.overalapping-div-link:hover a:hover {&lt;BR /&gt;width:100%;&lt;BR /&gt;height: 200px;&lt;BR /&gt;}&lt;BR /&gt;.related_blogs_cta {&lt;BR /&gt;background-color: #3262e900;&lt;BR /&gt;border: solid 1px #fff;&lt;BR /&gt;color:#fff;&lt;BR /&gt;}&lt;BR /&gt;.related_blogs_cta:hover,&lt;BR /&gt;.related_blogs_cta:focus,&lt;BR /&gt;.related_blogs_cta a:hover,&lt;BR /&gt;.related_blogs_cta a:focus {&lt;BR /&gt;background-color: #fff!important;&lt;BR /&gt;color: #3262e9!important;&lt;BR /&gt;}&lt;BR /&gt;.overlapping-div-image-2{&lt;BR /&gt;margin-top: 60px!important;&lt;BR /&gt;}&lt;BR /&gt;}&lt;BR /&gt;&amp;lt;/style&amp;gt;&lt;/P&gt;</description>
      <pubDate>Tue, 19 Apr 2022 18:14:07 GMT</pubDate>
      <guid>https://community.hubspot.com/t5/CMS-Development/Adding-Blog-Posts-w-Pagination-To-Website-Page/m-p/618292#M28374</guid>
      <dc:creator>eslobrown</dc:creator>
      <dc:date>2022-04-19T18:14:07Z</dc:date>
    </item>
    <item>
      <title>Re: Adding Blog Posts w/ Pagination To Website Page</title>
      <link>https://community.hubspot.com/t5/CMS-Development/Adding-Blog-Posts-w-Pagination-To-Website-Page/m-p/618549#M28381</link>
      <description>&lt;P&gt;&lt;a href="https://community.hubspot.com/t5/user/viewprofilepage/user-id/17186"&gt;@Anton&lt;/a&gt; , any thoughts?&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/371118"&gt;@eslobrown&lt;/a&gt; , do you have an example link?&lt;/P&gt;</description>
      <pubDate>Wed, 20 Apr 2022 00:55:05 GMT</pubDate>
      <guid>https://community.hubspot.com/t5/CMS-Development/Adding-Blog-Posts-w-Pagination-To-Website-Page/m-p/618549#M28381</guid>
      <dc:creator>dennisedson</dc:creator>
      <dc:date>2022-04-20T00:55:05Z</dc:date>
    </item>
    <item>
      <title>Re: Adding Blog Posts w/ Pagination To Website Page</title>
      <link>https://community.hubspot.com/t5/CMS-Development/Adding-Blog-Posts-w-Pagination-To-Website-Page/m-p/618570#M28382</link>
      <description>&lt;P&gt;Thanks for the reply &lt;a href="https://community.hubspot.com/t5/user/viewprofilepage/user-id/13982"&gt;@dennisedson&lt;/a&gt;. Following is a link to the Hubspot preview page:&amp;nbsp;&lt;A href="https://tinyurl.com/eb9fkh94" target="_blank" rel="noopener"&gt;https://tinyurl.com/eb9fkh94&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;As you can see (on desktop, at least), the third post appears indented under the first post, while the 4th post appears under the 3rd, when it should appear to the right of the third.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I’d settle for just getting the alignment of the four posts right here without the pagination as we can just link to the second page of the blog tag page (&lt;A href="https://tinyurl.com/3nvp2jwt" target="_blank" rel="noopener"&gt;https://tinyurl.com/3nvp2jwt&lt;/A&gt;), when available.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks again!&lt;/P&gt;</description>
      <pubDate>Wed, 20 Apr 2022 01:35:29 GMT</pubDate>
      <guid>https://community.hubspot.com/t5/CMS-Development/Adding-Blog-Posts-w-Pagination-To-Website-Page/m-p/618570#M28382</guid>
      <dc:creator>eslobrown</dc:creator>
      <dc:date>2022-04-20T01:35:29Z</dc:date>
    </item>
    <item>
      <title>Re: Adding Blog Posts w/ Pagination To Website Page</title>
      <link>https://community.hubspot.com/t5/CMS-Development/Adding-Blog-Posts-w-Pagination-To-Website-Page/m-p/619067#M28397</link>
      <description>&lt;P&gt;&lt;a href="https://community.hubspot.com/t5/user/viewprofilepage/user-id/371118"&gt;@eslobrown&lt;/a&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;In my opinion, the best way to tackle this is by using &lt;A href="https://css-tricks.com/snippets/css/a-guide-to-flexbox/" target="_blank" rel="noopener"&gt;css's flex rule&lt;/A&gt;.&lt;/P&gt;
&lt;P&gt;Here is what I would add (for desktop, you would make changes as you reduce screen size&lt;/P&gt;
&lt;P&gt;On the container:&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;.overlapping-div-container {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 10px;
   }&lt;/LI-CODE&gt;
&lt;P&gt;on the items:&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;.overlapping-div-container .span6 {
  width: calc(50% - 1rem);
  margin: 0;
  background: #fff;
}&lt;/LI-CODE&gt;
&lt;P&gt;This is how it looks for me with that code:&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Firefox_Developer_Edition.png" style="width: 400px;"&gt;&lt;img src="https://community.hubspot.com/t5/image/serverpage/image-id/64524i2ED325457729BC19/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Firefox_Developer_Edition.png" alt="Firefox_Developer_Edition.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;and style away &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;
&lt;P&gt; &lt;/P&gt;</description>
      <pubDate>Wed, 20 Apr 2022 17:03:23 GMT</pubDate>
      <guid>https://community.hubspot.com/t5/CMS-Development/Adding-Blog-Posts-w-Pagination-To-Website-Page/m-p/619067#M28397</guid>
      <dc:creator>dennisedson</dc:creator>
      <dc:date>2022-04-20T17:03:23Z</dc:date>
    </item>
    <item>
      <title>Re: Adding Blog Posts w/ Pagination To Website Page</title>
      <link>https://community.hubspot.com/t5/CMS-Development/Adding-Blog-Posts-w-Pagination-To-Website-Page/m-p/619129#M28399</link>
      <description>&lt;P&gt;&lt;A href="https://community.hubspot.com/t5/user/viewprofilepage/user-id/13982" target="_blank"&gt;@dennisedson&lt;/A&gt;, really appreciate the reply. Unfortunately, even with your help, this is a bit outside my scope so I'm going to be reaching out to a professional developer for help. Feel free to reach out directly if you have someone you'd recommend.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks again.&lt;/P&gt;</description>
      <pubDate>Wed, 20 Apr 2022 18:15:20 GMT</pubDate>
      <guid>https://community.hubspot.com/t5/CMS-Development/Adding-Blog-Posts-w-Pagination-To-Website-Page/m-p/619129#M28399</guid>
      <dc:creator>eslobrown</dc:creator>
      <dc:date>2022-04-20T18:15:20Z</dc:date>
    </item>
  </channel>
</rss>

