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

next previous entry filter

How Do I?

macguido's avatar
macguido
1 posts
about 11 years ago
macguido's avatar macguido

I have a channel “portfolio” in which there are entries (photo). Each photo has both a category and some tag. I’m using dev demon tagger plugin. No problem in showing a list of photos filtered by either category or tag. The problem comes in the view page of the single entry, when the user navigates through the entries. The next/prev links work well with categories:

{exp:channel:entries channel="portfolio" disable="member_data|pagination" limit ="1"}
...some code here
{/exp:channel:entries}

then outside the channel loop:

{exp:channel:next_entry channel ="portfolio" category="{last_segment_category_id}"}
...some code here
{/exp:channel:next_entry}

But is there a way to show next/prev entry links filtered by tag? Should I use a custom sql query? Or perhaps use a different template page for the tags?

Here is my url structure:

www.example.com/portfolio this shows a list of categories (they are actually galleries of photo divided by category)

The items list has this url structure: www.example.com/portfolio/list/category/category_name and each item links to a list of pictures filtered by “category_name”

www.example.com/portfolio/view/entry_title/category_name

On the view page of the single entry, the tags list link is: www.example.com/portfolio/list/tags/tag_name

This links to a list of pictures filtered by tag. But again, when going from the entries tag list to the view page, I cannot get the next/prev links to work filtered by tags.

Can this be done?

       

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.