1

Firstly we have checked the primary category settings and have checked the entry has a primary cat.

When we use the primary category tag pair within and entries loop it doesnt work, just spitting all of the tags out in the page with their curly braces, for example this is the page output viewed in a browser:

{primary_categories category_group="1" entry_id="23"} {primary_category_id} {primary_category_name} {/primary_categories}

However the tag pair on its own, passed an entry ID works?

Here's to code that doesn't work:

{exp:channel:entries channel="content_articles" entry_id="{segment_2}" disable="member_data|pagination" category_group="1" }
<h1>{title}</h1>

{primary_categories category_group="1" entry_id="{segment_2}"}  
    {primary_category_id} <br>
    {primary_category_name} <br>
    {primary_category_url_title} <br>
    {primary_category_description} <br>
    {primary_category_image} <br>
    {primary_category_CUSTOM_CATEGORY_FIELD} <br>
    {primary_category_group_id} <br>
    {primary_category_group_name} <br>
    {primary_category_order} <br>
    {primary_category_parent_id} <br>
    {primary_category_parent_name} <br>
    {primary_category_parent_url_title}   <br>    
{/primary_categories}
{/exp:channel:entries}

Where as this does work:


{exp:primary_category entry_id="{segment_2}"}
    {primary_category_id} <br>
    {primary_category_name} <br>
    {primary_category_url_title} <br>
    {primary_category_description} <br>
    {primary_category_image} <br>
    {primary_category_CUSTOM_CATEGORY_FIELD} <br>
    {primary_category_group_id} <br>
    {primary_category_group_name} <br>
    {primary_category_order} <br>
    {primary_category_parent_id} <br>
    {primary_category_parent_name} <br>
    {primary_category_parent_url_title}   <br> 
{/exp:primary_category}

Any thoughts why this would be??

2
  • Hi, which version of Primary Category and EE are you using out of curiosity? It works in my testing... – Solspace Jun 11 '14 at 4:44
  • Sorry, that would help! Its PrimeCat 2.2.3 and EE V2.8.1 - BUILD DATE: 20140314. If it helps we can get you a login? – Paul Cripps Jun 11 '14 at 7:27

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.