All Low add-ons are now owned by EEHarbor. Read the blog post.

Support archive

Seg2Cat in a reverse_related, category being ignored

Finn Steele 24 Oct 2012 17:34 question, complete

Hello and thank you for your free plugin!

My URL is /exhibitions/category/exhibition-1/ (and exhibition-2, exhibition-3 etc.)

I'm using the code below, and was hoping that Seg2Cat would return only those {work_image:thumb}s that have the category in the current URL assigned to them.

However the first {work_image:thumb} that is being found is being returned - regardless of category.

If I just put {segment_3_category_id} somewhere in the template, it correctly prints the current category on the screen.

I've tried various other tags such as _category_name, _last_category etc.

Thanks!

Replies

  1. Low 25 Oct 2012 07:38

    Actually, this is because the reverse_related_entries variable pair doesn't support the category="" parameter. You're probably better off using Playa instead.

  2. Finn Steele 25 Oct 2012 08:13

    Thank you, I had no idea!

    I was actually doing this, which seemed to work:

    {categories}
    {if category_url_title == segment_3}
    reverse related entry
    {/if}
    {/categories}

    But as soon as I put a limit of 1 in the reverse related entry it stopped working properly.

    I'll check out Playa as you suggest. Thanks again for your help!