The Blog Studio

We are internet culture creators with a focus on
DESIGN, DEVELOPMENT & SOCIAL MEDIA.

Blog > Guide > Limiting Search Results in Expression Engine

Limiting Search Results in Expression Engine

Lucia Mancuso, 10 September, 2008 0 Comments

Today I was tasked with added pagination to search results for an Expression Engine site. Piece of cake! Or so I thought.

Ellis Labs, the creators of Expression Engine, did an amazing job with the documentation for their other project CodeIgniter,
but I find the Expression Engine docs to be somewhat lacking. For
example, there is no mention of how to set the number of search results
to return on search results page. I believe the default is 50, but if
that’s more than you want, which was the case today, there is no
explanation (that I could find), in the documentation, wiki or forums
for how to achieve this. Please point it out if you can find it.

After a little digging into the search class I managed to find the
answer, and I thought I’d share it here. Quite simply, all you need to
do is add a hidden field to the search form to set the post variable
“RES” to the number of results you want.

eg. <input type=”hidden” name=”RES” value=”25″> – will return 25 results per page.

Hope this helps!

Comments are closed.

Feature

We are looking forward to the holidays. We'll all be at #hohoto supporting an amazing cause & dancing our butts off. Come dance with us.

RFP

Excited? So are we! Fill out our RFP and start from there!

Request For Proposal

Facebook

Flickr

Newsletter

Subscribe to our newsletter!

Subscribe to our mailing list

* indicates required
×