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.

Displaying an entries child category

December 05, 2012 10:09pm

Subscribe [1]
  • #1 / Dec 05, 2012 10:09pm

    kippbrady

    3 posts

    Hi,

    I’m trying to return a list of entries broken into their top level categories. I then want to display what child category each entry belongs to within the entry. Something like the following where {child_category_name} would output the entries child categories if they exist. I also need to be able to sort these entries by there child category. Is this possible?

    Thanks

    {exp:channel:categories channel="people" style="linear" parent_only="yes"}
      <section>
       <h2>{category_name}</h2><p> <br />
       <ul><br />
        {exp:channel:entries category="{category_id}" dynamic="off"}<br />
         <li><br />
          </p><h3>{title}</h3>
    <p>      {child_category_name}<br />
         </li><br />
        {/exp:channel:entries}<br />
       </ul><br />
      </section><br />
     {/exp:channel:categories}

  • #2 / Dec 05, 2012 11:48pm

    Bhashkar Yadav

    727 posts

    You can use GWcode Categories which work very well for populating the categories in many ways.

    Hope it would help you.

    Best Regards,

  • #3 / Dec 06, 2012 12:30am

    kippbrady

    3 posts

    Many thanks.

    The plugin did what I needed.

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

ExpressionEngine News!

#eecms, #events, #releases