paging in search results

Get help with installation and running PivotX 2.0.x here. Please do not post Extension or Theme related questions here.

paging in search results

Postby winters » Wed Jan 27, 2016 5:54 pm

hi all,

I would like to use the code underneath in the search results.

A I like to use paging with this

Code: Select all
[[foreach amount=12 from=$searchresults item=result]]

 <h2><a href="[[ link hrefonly=1 ]]">[[ title ]]</a></h2>
            <h3>[[ subtitle ]]</h3>

               [[ paging action='prev' amount=12  ]] |
                    [[ paging action='next' amount=12  ]]   </center>

amount =12 has no influence

does someone know what the correct code should be

Posts: 86
Joined: Thu Jan 13, 2011 9:09 pm

Re: paging in search results

Postby Harm10 » Thu Jan 28, 2016 8:50 am

I am fairly sure the paging template will not work on this. Paging searches for the active (sub)weblog and works on that. If it finds something that surely will not be the search results.

And if you want to limit the amount of results you need to stop the foreach loop yourself. This is a standard smarty template: Look at the index or iteration description to see how to work with that.

Edit: maybe you can try to use the standard section template? That has a max parm to limit the loop.
Quality is in the detail of things............

Want to change or update your PivotX site? Mail or PM me!
I can also convert your site to a Wordpress site!
Posts: 2011
Joined: Wed Jun 17, 2009 9:37 am
Location: Somewhere in The Netherlands (aka Holland)

Re: paging in search results

Postby winters » Fri Jan 29, 2016 1:50 am

you are the best harm, for the time being I will use

[[if $smarty.foreach.list.index == 12]]

Posts: 86
Joined: Thu Jan 13, 2011 9:09 pm

Return to 2.x Support Forum

Who is online

Users browsing this forum: No registered users and 8 guests