CMS Development

designfrance
Participant | Diamond Partner
Participant | Diamond Partner

my articles in my listing are not displayed

In the parameters of my blog I put display 12 articles but in my blog listing only 7 are displayed ... How to make for all the sees?

0 Upvotes
8 Replies 8
prosa
Top Contributor

my articles in my listing are not displayed

Hey I see what you are trying to do setting i and j, with hubl you have variables you can use to track the index of the loops. you can use loop.index to know the position on the array. 

If this post helped you resolve your issue, please consider marking it as the solution. Thank you for supporting our HubSpot community.
0 Upvotes
prosa
Top Contributor

my articles in my listing are not displayed

did you update your blog configuration to show 12 blog posts in your blog listing page?

 

You can verify this number like this

<span class="blogs-count">{{ contents|length }}</span>

 

 

If this post helped you resolve your issue, please consider marking it as the solution. Thank you for supporting our HubSpot community.
0 Upvotes
designfrance
Participant | Diamond Partner
Participant | Diamond Partner

my articles in my listing are not displayed

Yes I configurated to show 12 blog posts, I put 11 to see if something change but no

0 Upvotes
prosa
Top Contributor

my articles in my listing are not displayed

do you have multiple blogs? make sure you are on the right blog.  Also, if you are working on a different blog the config of the default blog is what you will see on the preview of your template. 

If this post helped you resolve your issue, please consider marking it as the solution. Thank you for supporting our HubSpot community.
0 Upvotes
designfrance
Participant | Diamond Partner
Participant | Diamond Partner

my articles in my listing are not displayed

I trying to see difference between blog but I see nothing 😕

0 Upvotes
prosa
Top Contributor

my articles in my listing are not displayed

Hi there can you share more information So I can try to help you? please show the code you are trying to use

If this post helped you resolve your issue, please consider marking it as the solution. Thank you for supporting our HubSpot community.
designfrance
Participant | Diamond Partner
Participant | Diamond Partner

my articles in my listing are not displayed

Hi Prosa, 
I post 8 articles and only 7 are displayed  

This is my code in Blog content 

<div class="blog-listing">
  <div class="post-main">
    <div class="container">
      <div class="row">
        <div class="container">
          {% if not topic %}
          {% set last_post = blog_recent_posts('default', 1) %}
        </div>
      </div>  
    </div>
  </div>
</div>

<div class="last-articles">
  <div class="container">
    <div class="row">
      <div class="col-md-12">
        {% else %}
        <!-- <h2>Toutes nos actualités</h2> -->
      </div>

      {% if blog_author %}
      <div class="author-title">
        <p>Articles by {{ blog_author.display_name }}</p>
      </div>
      {% endif %}

      {% if topic %}
      <div class="topic-title">
        <p>Topic: <span>{{ topic }}</span></p>
      </div>
      {% endif %}
      {% endif %}
    </div>
  </div>
</div>



<div class="post-listing">
  <div class="container row">
    {% set i = 0 %} <!-- changed by hubspot -->
    {% set j = 0 %}
    {% for content in contents %}
    {% if i != 1 %}
    <div class="span4 content-article">
      <a class="link-img" href="{{ content.absolute_url }}" style="background: url({{content.featured_image}}) no-repeat; background-size:cover; "></a>
      {% for tag in content.tag_list %} {% set t = t + 1 %} {% if t == 1 %}
      <div class="content">
        <div class="date-tag">
          <a class="topic-link tag-link" href="{{ blog_tag_url(group.id, tag.slug) }}">{{ tag.name }}</a> {% endif %} {% endfor %}
          <span>| {{ content.publish_date|datetimeformat('%d %B %Y') }}</span>
        </div> 
        <a class="content-info" href="{{ content.absolute_url }}"><h3>{{ content.name }}</h3></a>
      </div>
    </div>
    {% endif %}
    {% set i = i + 1 %}
    {% set j = j + 1 %}
    {% endfor %}

    <!-- CTA -->

    <div class="blog-article-cta span8">
      <div class="overlay">

        <!--HubSpot Call-to-Action Code -->
        <span class="hs-cta-wrapper" id="hs-cta-wrapper-0d2211e2-2521-47ac-83e5-13e789f4f7dd"><span class="hs-cta-node hs-cta-0d2211e2-2521-47ac-83e5-13e789f4f7dd" id="hs-cta-0d2211e2-2521-47ac-83e5-13e789f4f7dd"><!--[if lte IE 8]><div id="hs-cta-ie-element"></div><![endif]--><a href="https://cta-redirect.hubspot.com/cta/redirect/5091817/0d2211e2-2521-47ac-83e5-13e789f4f7dd" ><img class="hs-cta-img" id="hs-cta-img-0d2211e2-2521-47ac-83e5-13e789f4f7dd" style="border-width:0px;" src="https://no-cache.hubspot.com/cta/default/5091817/0d2211e2-2521-47ac-83e5-13e789f4f7dd.png"  alt="Téléchargez gratuitement   Le nouvel e-book de Sercel pour en apprendre plus JE TÉLÉCHARGE"/></a></span><script charset="utf-8" src="https://js.hscta.net/cta/current.js"></script><script type="text/javascript"> hbspt.cta.load(5091817, '0d2211e2-2521-47ac-83e5-13e789f4f7dd', {}); </script></span><!-- end HubSpot Call-to-Action Code -->

      </div>
    </div>
    <!-- END CTA -->


    <div class="pagination">

      {% set total_pages = contents.total_page_count %} <!-- sets variable for total pages -->
      {% set more_pages = total_pages - current_page_num %} <!-- sets variable for how many more pages are past the current pages -->
      {% if total_pages > 1 %}
      <nav>
        <ul>
          <li class="{% if current_page_num == 1 %}disabled{% endif %}"><a href="{% if last_page_num=="1" %}{{ group.absolute_url }}{% else %}{{blog_page_link(last_page_num)}}{% endif %}">Articles précédents</a></li>
          {% if more_pages == 0 %}
          {% if current_page_num - 4 == 1 %}<li><a href="{{ group.absolute_url }}">{{ current_page_num - 4 }}</a></li>{% endif %}
          {% if current_page_num - 4 > 1 %}<li><a href="{{ blog_page_link(current_page_num - 4) }}">{{ current_page_num - 4 }}</a></li>{% endif %}
          {% endif %}
          {% if more_pages <= 1 %}
          {% if current_page_num - 3 == 1 %}<li><a href="{{ group.absolute_url }}">{{ current_page_num - 3 }}</a></li>{% endif %}
          {% if current_page_num - 3 > 1 %}<li><a href="{{ blog_page_link(current_page_num - 3) }}">{{ current_page_num - 3 }}</a></li>{% endif %}
          {% endif %}
          {% if current_page_num - 2 == 1 %}<li><a href="{{ group.absolute_url }}">{{ current_page_num - 2 }}</a></li>{% endif %}
          {% if current_page_num - 2 > 1 %}<li><a href="{{ blog_page_link(current_page_num - 2) }}">{{ current_page_num - 2 }}</a></li>{% endif %}
          {% if current_page_num - 1 == 1 %}<li><a href="{{ group.absolute_url }}">{{ current_page_num - 1 }}</a></li>{% endif %}
          {% if current_page_num - 1 > 1 %}<li><a href="{{ blog_page_link(current_page_num - 1) }}">{{ current_page_num - 1 }}</a></li>{% endif %}
          <li class="active"><a href="{% if current_page_num==1 %}{{ group.absolute_url }}{% else %}{{ blog_page_link(current_page_num) }}{% endif %}">{{ current_page_num }}</a></li>
          {% if current_page_num + 1 <= total_pages %}<li><a href="{{ blog_page_link(current_page_num + 1) }}">{{ current_page_num + 1 }}</a></li>{% endif %}
          {% if current_page_num + 2 <= total_pages %}<li><a href="{{ blog_page_link(current_page_num + 2) }}">{{ current_page_num + 2 }}</a></li>{% endif %}
          {% if current_page_num <= 2 %}
          {% if current_page_num + 3 <= total_pages %}<li><a href="{{ blog_page_link(current_page_num + 3) }}">{{ current_page_num + 3 }}</a></li>{% endif %}
          {% endif %}
          {% if current_page_num == 1 %}
          {% if current_page_num + 4 <= total_pages %}<li><a href="{{ blog_page_link(current_page_num + 4) }}">{{ current_page_num + 4 }}</a></li>{% endif %}
          {% endif %}
          <li class="{% if current_page_num == total_pages %}disabled{% endif %}"><a href="{{blog_page_link(next_page_num)}}">Articles suivants</a></li>
        </ul>
      </nav>
      {% endif %}
    </div>

  </div>
</div>

0 Upvotes
designfrance
Participant | Diamond Partner
Participant | Diamond Partner

my articles in my listing are not displayed

Thanks you but I don't understand ...

0 Upvotes