Skins

Can I paginate my search results?

Scenario:
"I already use one of the recommended methods for paginating my blog but I would like to get this for my search results as well, since some search results return very long pages."

Original forum thread (thanks, roel!):
http://forum.nucleuscms.org/viewtopic.php?t=14843

Solution:
You can use the <%prevlink%> and <%nextlink%> built-in Nucleus variables to paginate your search results.

Just place the following code in your Search skin part to get your search results in pages of X items per page:

<%searchresults(templatename/index,X)%>
<%prevlink(previous results,X)%> | <%nextlink(next results,X)%>

where templatename is the name of your template.

section: Skins | submitted by Leng on 2007.Feb.24 | 1486 views

item rate
This answer was not rated yet.

Please tell us how useful this answer was to you (0 = useless, 10 = very very helpful):

10