Plugin

Archived
Forum
(read-only)

Ben Martin does not actively monitor this forum
(but you can still get help from other EE users).

BMS URL Change

ExpressionEngine 2

Back to this add-on's main page
View Other Add-ons From Ben Martin

     

You must be logged in to post.

Can’t get pagination to work

General

conradical
conradical

Hi,
First off, this is a much needed plugin and I can’t wait t get it up and running. I have a few issues and if you could help point me in the right direction that would be great!

First the two problems I have and then I’ll show you how I am implementing.
1.  I changed the URL to display page/6 by adding pbase=“page/”. However with each number in the pagination link, i keep getting “page/” added to the url: page/page/7 etc..

2. When I do not use the BMS plugin, my pagination works, meaning I can access p10 and P20 etc and the content changes and displays older posts. With the BMS, if I click on page 2 the URL updates to page/6 but it yet displays page 1 content. The pagination at the bottom also indicates that the active/current page is page 1.

I’ve tried a bunch of different things but here is what I have currently.

{exp:bms_url_change pp="10" slash="no" pbase="page/"}
<h1>{segment_2_category_name}</h1>
{exp:channel:entries channel="news-room" orderby="entry_date" sort="desc" limit="10" category="{segment_2_category_id}" status="open|unsearchable" dynamic="no" paginate="bottom"}

<article class="news-article">
        <
h3>
            
{if news-item-body}
                
<a href="{site_url}company/{segment_2}/{categories}{if parent_id != '0'}{category_url_title}{/if}{/categories}/{entry_date format=">
                    
{if news-item-title == ""}
                        {title}
                    {if
:else}
                        {news
-item-title}
                    {
/if}
                
</a>
   
{if:else}
                {if news
-item-title == ""}
                        {title}
                    {if
:else}
                        {news
-item-title}
                    {
/if}
            {
/if}
        
</h3>
        
        
{news-item-summary}
        
        {if news
-item-body}
            
<p>
                <
a href="{site_url}company/{segment_2}/{categories}{if parent_id != '0'}{category_url_title}{/if}{/categories}/{entry_date format=" class="readmore">
                    Continue 
Reading...
                </
a>
            </
p>
        
{/if}
        
        
<class="postmeta newsmeta">
        
Posted on {entry_date format="%F %d %Y"}in {categories}<a href="{segment_2}/{category_url_title}">{if parent_id != "0"}{category_name}{/if}</a>{/categories}
        
</p>
        
        </
article>
    
{if no_results}
       {redirect
="404"}
    {
/if}  

    {paginate}
    {exp
:bms_url_change:link pp="{lv_se_perpage}" slash="no" pbase="page/"}
        
<class="pagination">
            
{!-- Page {current_page} of {total_pages} pages --}
            {pagination_links}
        
</p>
        
{/exp:bms_url_change:link}
    {
/paginate}

{
/exp:channel:entries} 
jbriggs
# 1
jbriggs

Would love to know how you get on with this.  I’m having the same problems, especially with your second issue.  The pagination links simply don’t correspond with the resulting URL.

With your first issue, did you try a pbase without the forward slash?  (eg pbase=“page”)