I have a category Group titles “portfolio” (id #3) and inside of it I have 4 categories. Each portfolio entry is assigned to just 1 of them. NExt I would like to use the Next/Previous entries tag on my portfolio item page, but i want to limit the results on that to entries in the same category as the one being displayed. Right now I have this within my channel entries tag:
{layout:set name="catid"}
{categories category_group="3"}{category_id}{/categories}
{/layout:set}and then I pass the layout variable “catid” into the Next/previous entries, but this doesn’t seem to work.
Thanks for the suggestions… When I looked at it with fresh eyes this morning, what actually worked was to modify my creation of the layout variable like so within the channel entries loop:
{categories category<em>group="3"}
{layout:set name="catid"}{category</em>id}{/layout:set}
{/categories}
Yeah… I see that now that you mention it. but for category group 3, I only ever use one of them. the entry is either branding, marketing, web, or Motion (or one of it’s child categories - so here maybe I should grab the parent_id instead), so here it should be safe. it’s my own site so I should be OK (until I’m not I guess)
Packet Tide owns and develops ExpressionEngine. © Packet Tide, All Rights Reserved.