ExpressionEngine CMS
Open, Free, Amazing

Thread

This is an archived forum and the content is probably no longer relevant, but is provided here for posterity.

The active forums are here.

Limiting the display of categories

September 23, 2012 4:17pm

Subscribe [2]
  • #1 / Sep 23, 2012 4:17pm

    Scott Harrington

    85 posts

    Hi, please would somebody be able to help me with limiting the display of categories from my markup below:

    Basically I have two category groups assigned to one channel (item & brand, catID2 & catID3) and I wish for the category details, from the brand ID group only, to output in to the H2 and P tags below. However from using the below method EE is outputting two H2s and two Ps using the info from both category ID groups.

    How would I limit to display just the details from the brand group only (ID3) and bypassing the item group (ID2).

    {exp:channel:entries channel="products" category="13" fixed_order="626|494|625" limit="3"}
    {if count == "1"}
    {categories}
    <h2>{category_name}</h2>
    <p><a href="http://{path=">more {category_name}</a><br />
    {/categories}<br />
    {/if}<br />
    {/exp:channel:entries}

    Any help would be greatly appreciated.

    Thanks

  • #2 / Sep 24, 2012 2:11pm

    the3mus1can

    426 posts

    Take a look at the Channel Entries categories variable pair docs http://ellislab.com/expressionengine/user-guide/modules/channel/channel_entries.html#categories

    There are some params you can put on the variable pair that will probably do what you are looking for.

  • #3 / Sep 24, 2012 2:22pm

    Scott Harrington

    85 posts

    Spot on! I did go through all this first time round but must’ve missed what I was looking for, thanks for the fresh eyes… 😉

.(JavaScript must be enabled to view this email address)

ExpressionEngine News!

#eecms, #events, #releases