LISE pagination limit

Have a question or a suggestion about a 3rd party addon module or plugin?
Let us know here.
Post Reply
andrewvideouk
Forum Members
Forum Members
Posts: 155
Joined: Thu Aug 20, 2020 10:49 pm

LISE pagination limit

Post by andrewvideouk »

HI

I am trying to work out how to limit how pages to display. Can someone tell me how to go about it please.

I did find this viewtopic.php?t=82245 and works great but it still shows all the pages. I want only to limit to 7 pages max. The items (Blog) I don't really want to show realy old blogs.

This I don't want to happend which found from the link.

Code: Select all

<< Previous blogs … | 4 | 5 | 6 | 7 | 8 | 9 | 10 … | More Blogs >> 
This would like to happend

Code: Select all

<< Previous blogs | 1 | 2 | 3 | 4 | 5 | 6 | 7 | More Blogs >>

Your help would be great.


Thank you.
andrewvideouk
Forum Members
Forum Members
Posts: 155
Joined: Thu Aug 20, 2020 10:49 pm

Re: LISE pagination limit

Post by andrewvideouk »

This is the code I have done. I don't know if this is a bad way of doing it.

Code: Select all

{$Maxpagecount = 7 }
	{if $Maxpagecount > 1}
<p style="text-align: center;" >{if $pagenumber == 1}
<span class="linkdead">Previous  Blogs </span>{/if}
{if $pagenumber > 1}
<span class="linkpages"><a href="blog/&bpage={$pagenumber-1}">Previous  blogs</a> </span>{/if}
{foreach from=$pagelinks item=page}
{if $pagenumber == {$page->link|strip_tags}
}
&#124;<span class="pagedead">{$page->link|strip_tags}
</span>{else}
&#124;{assign var=pagez value=$page->link|strip_tags|replace:' ':''}
 <a href="blog/&bpage={$pagez}">{$page->link|strip_tags|replace:' ':''}</a> {/if}

{if $page@index eq $Maxpagecount-1}
    {break}
{/if}

{/foreach}
&#124;{if $pagenumber < $Maxpagecount}		
<span class="linkpages"><a href="blog/&bpage={$pagenumber+1}">More Blogs</a></span>{else}
<span class="linkdead"> More Blogs</span>{/if}
</p>{/if}

for cleaner urls

I put this on the blog page

Code: Select all


{if !empty({$smarty.get.bpage})}

 {LISEblog orderby="item_position|DESC"  pagelimit="10" pagenumber={$smarty.get.bpage} summarytemplate="MainBlog" }

{else}

 {LISEblog orderby="item_position|DESC" pagelimit="10"  summarytemplate="MainBlog" }


{/if}
so the url is site.com/blog/&bpage=3

really I would like to be site.com/blog/page/3
Post Reply

Return to “Modules/Add-Ons”