CMS Development

LapLabs
Participant

Pagination within same topic in blog post

Hi, I am doing a news blog and every month we will create a monthly summary blog post with topic "monthly"

 

Within that monthly summary blog post, I would like the pagination is directing them to previous "month" or next "month" but not by posts on the blog.

 

The code below is just doing the pagination under the same blog but I want to specify it in same topic only.

 

{% if not simple_list_page %}
                <div class="blog-pagination">
                    {% if last_page_num %}
                        <a class="previous-posts-link" href="{{ blog_page_link(last_page_num) }}">Previous</a>
                    {% endif %}
                        <a class="all-posts-link" href="{{ group.absolute_url }}/all">All posts</a>
                    {% if next_page_num %}
                        <a class="next-posts-link" href="{{ blog_page_link(next_page_num) }}">Next</a>
                    {% endif %}
                </div>
{% endif %}

 

 

 Please help, thanks a lot!

 

0 Upvotes
4 Replies 4
Jsum
Key Advisor

Pagination within same topic in blog post

@LapLabs,

 

Clarify for me. You are wanting a section of your blog listing page to contain the blog posts with the topic of monthly, and you would like this section to use pagination to show one month at a time in order (so 1 monthly recap post at a time?)

 

Or..

 

You want to show all post in a month on the listing page and have the pagination split the posts per month into pages, i.e.:

 

Page 1 - January

Page 2 - Febuary

etc. 

 

 

0 Upvotes
LapLabs
Participant

Pagination within same topic in blog post

Hi Jsum,

 

Thanks for your reply. Let me explain more about that.

 

For example, under News Blog, it contains:

News Post A 

Monthly News Post - July

News Post B

.

.

.

 

News Post G

Monthly News Post - June

 

When inside the Monthly News Post, I would like the pagination directs to previous/next Monthly News but not every blog post, e.g. At the bottom of Monthly News Post - July, there is a previous button directs to Monthly News Post - June

0 Upvotes
LapLabs
Participant

Pagination within same topic in blog post

Can any one help?

0 Upvotes
Jsum
Key Advisor

Pagination within same topic in blog post

Sorry @LapLabs I forgot about this post. 

 

It still isn't clear to me what you are trying to do. I think the reason that it is confusing is that there are many different variations to do what I am understanding that you are talking about on both the listing and artlcie plages and your discription is not very descriptive about which template you are wanting to do this on, or where on the template (i.e. the main blog list, a sidebar or secondary blog list, etc. I could write you a book on each variation that I am thinking of and it could still not be helpful. If you could provide a visual example like a wireframe, design, live page, or a sketch of some kind, or/and if you could be more specific as to what you are wanting to do, how you are wanting to do it, and how you would expect it to interact with a basic blog template then I have no doubt that we could bring this home for you. 

0 Upvotes