I’m working on a photographic website. I have images arranged by type in different weblogs such as “plants-landscapes”, “mammals” and “people”. Sometimes images need to appear in several categories (e.g. a flower meadow with people in it will feature in both the flower gallery and people gallery). I’ve managed to work out how to do this and also, I seem to have Previous/Next working when people click on images from the gallery.
However, if you do a search, things break down.
As an example I have the flower “fritillary” in the “flowering plants” gallery (plants-landscapes) and also in the “people” gallery (people-env)
Searching for “fritillary” brings back thumbnails of all relevant pictures from both weblogs.
Clicking on a thumbnail then brings up a large image. When on the large image page I’m relying on Previous/Next to allow people to browse through the search results. The code I’m using is:
{exp:weblog:next_entry category="{categories}{category_id}{/categories}"}<a href="http://{path=">Previous</a>{/exp:weblog:next_entry}
|
{exp:weblog:prev_entry category="{categories}{category_id}{/categories}"}<a href="http://{path=">Next</a>{/exp:weblog:prev_entry}I’m assuming that it is the {category_id} parameter that is the problem since the Previous/Next only works for the category ID of the first image and then stops as soon as it meets another category.
How can I restrict the Previous/Next to just the search results allowing it to work across different categories??? For example if someone searches for “red” this returns images of red grouse (category # xxx), red squirrel (category # yyy), etc. The Previous/Next needs to travel recognise the search results and travel through all the images encompassing the multiple categories to which the images belong.
Thanks in hope!!!
Dave
Moved to CodeShare Corner by Moderator