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

skoobi
skoobi

Hi, i'm trying to create my own page for the blog posts but for some reason i can get the pagination links showing but theres no links on it.

my url :: /blog/:page? Component is setup as "page number :: :page"

But when you hover over the link it only shows "/blog"

Heres the pagination code

{% if posts.lastPage > 1 %}
                        <nav class="post-pagination">
                            <ul class="pagination">
                                {% if posts.currentPage > 1 %}
                                <li><a href="{{ this.page.baseFileName|page({ (pageParam): (posts.currentPage-1) }) }}" class="pagination-prev" rel="prev"> « </a></li>
                                {% endif %}

                                {% for page in 1..posts.lastPage %}
                                <li class="{{ posts.currentPage == page ? 'active' : null }}">
                                    <a href="{{ this.page.baseFileName|page({ (pageParam): page }) }}" class="pagination-num">{{ page }}</a>
                                </li>
                                {% endfor %}

                                {% if posts.lastPage > posts.currentPage %}
                                <li><a href="{{ this.page.baseFileName|page({ (pageParam): (posts.currentPage+1) }) }}" class="pagination-first" rel="next"> » </a></li>
                                {% endif %}
                            </ul>
                        </nav>
                        {% endif %}

Any help would be greatful..

Cheers

skoobi
skoobi

Sorted/...

Need to use {{:page}} in the component dropdown.

1-2 of 2

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