This forum has moved to a new location and is in read-only mode. Please visit talk.octobercms.com to access the new location.

gavinfostered11132
gavinfostered11132

I have three blog categories set up "business, news, misc". I have one layout that shows a blog list of posts and a category blog list of posts. The sidebar contains a list of categories using the blogCategories component. I'm displaying 10 posts per page.

When there is more than one page, pagination links work fine but when I go to the next page the category url links in the side bar are also appended with the current page number. So on page 2 of the blog list (and page 2 of any category list) the side bar links for the categories are:

/blog/category/business/2
/blog/category/news/2
/blog/category/misc/2

What I expected (and need) in the sidebar (regardless of what page number I'm on) is:

/blog/category/business
/blog/category/news
/blog/category/misc

So users can jump to a category from any paginated page. I've followed the blog video in the documentation to the letter. Everything else works just great. How do I achieve this?

Thanks

Last updated

gavinfostered11132
gavinfostered11132

Overcame this by hard-coding the links in the blogCategories component template

<a href="{{ category.url }}">

Becomes:

<a href="/blog/category/{{ category.slug }}">

Small price to pay!

1-2 of 2

You cannot edit posts or make replies: the forum has moved to talk.octobercms.com.