We use cookies to improve your experience. No personal information is gathered and we don't serve ads. Cookies Policy.

ExpressionEngine Logo ExpressionEngine
Features Pricing Support Find A Developer
Partners Upgrades
Blog Add-Ons Learn
Docs Forums University
Log In or Sign Up
Log In Sign Up
ExpressionEngine Logo
Features Pro new Support Find A Developer
Partners Upgrades
Blog Add-Ons Learn
Docs Forums University Blog
  • Home
  • Forums

Basic pagination question

Development and Programming

Russ Back's avatar
Russ Back
142 posts
14 years ago
Russ Back's avatar Russ Back

Hi all.

I have a quick question. I have a module that pulls weblog entries out into a pagination list according to a number of filters that you can apply (it’s for roof tiles, example filters might include colour, size, material, etc). This all works great and the results are displayed in a list. If you click on a list item, we show the details of that item in a lightbox, which again works great.

However we have a requirement to be able to search for these items but we’ve not done this to date because each item is displayed in a lightbox on whatever page of the results you are looking for and therefore there is no template URL for each item.

An easy thing for us to do would be to add the channel to the search form and then when you click on a search result, show the first page of results and popup the lightbox with the selected item (which we would do by adding something to the URL). However when you close that lightbox, you could find that the item isn’t actually on the first page of results so if you want to look again, you’re stuck.

So… any thoughts on how a search could firstly find the items that match the search string, but also tell us it’s position in the overall list of channel entries (assuming they’re sorted alphabetically)? If we can get this position then we can work out where in the pagination it would sit and load the relevant view accordingly.

Any thoughts?

       

Reply

Sign In To Reply

ExpressionEngine Home Features Pro Contact Version Support
Learn Docs University Forums
Resources Support Add-Ons Partners Blog
Privacy Terms Trademark Use License

Packet Tide owns and develops ExpressionEngine. © Packet Tide, All Rights Reserved.