0

I'm displaying some related entries by means of the {parents} tag pair. Whilst I can get all the field information as I need it doesn't seem possible to display the categories that are assigned to the related entry.

I've tried

{parents}
    {parents:categories backspace="2"}{parents:category_name}{/parents:categories}
{/parents}

and many other combinations - but I only seem able to get it to display the tags themselves.

Does anyone have an idea for this (which ideally doesn't involve embeds).

9
  • Are you closing the tags correctly? Did you write the wrong code just here? {/parents:category}, right?
    – Sobral
    Nov 21 '14 at 16:30
  • I was thinking the same thing! Shouldn't it be just {parents}{parents:category_name}{/parents} or {parents}{category_name}{/parents} ?
    – Natetronn
    Nov 21 '14 at 16:35
  • Also, if you can't find a solution there seems to be an add-on: devot-ee.com/add-ons/category-parents (no solution may be the reason this add-on exists?)
    – Natetronn
    Nov 21 '14 at 16:38
  • Yes that's a typo in my question :) Will correct it now.
    – foamcow
    Nov 21 '14 at 16:39
  • Natetronn, you need the categories tag pair so it loops through, and displays all the categories. I tested your suggestion anyway and it doesn't work.
    – foamcow
    Nov 21 '14 at 16:44

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.