0

I'm wondering what the best way to do this may be. I probably haven't worded the question in the best way so I'll explain.

Basically, I have an entry on page which is assigned to a category. On the page I'd like to be able to display other entries assigned to the same category. Sort of a 'similar projects' concept. This needs to be done dynamically however.

My hunch is that I may need to use a query to first pull through the category id of the current entry being shown, then use that value in the category="" parameter.

Can anyone point me in the right direction with this

{exp:query sql="SELECT cat_id FROM exp_channel_data"}

{exp:channel:entries
 channel="projects"
 dynamic="off"
 category="{cat_id}"}

  {title}

{/exp:channel:entries}          
{/exp:query}

Maybe something like this but I'm really unsure. Any help would be much appreciated

1 Answer 1

1

Apologies, I have just seen the related_categories_mode="yes" parameter.

Problem solved.

2
  • Please, Adam, mark your answer as right. Thank you!
    – Sobral
    Jun 2, 2014 at 14:10
  • Can't mark my own answer for another 23 hours so I'm being told. Will mark it ASAP though
    – Adam
    Jun 3, 2014 at 11:05

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.