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 category description

May 21, 2012 11:03am

Subscribe [3]
  • #1 / May 21, 2012 11:03am

    pmerritt

    24 posts

    I have a template that shows entries based on categories. I’d like to have the category description appear regardless of whether there are any entries or not. I can’t manage to get it to work. I tried:

    {exp:channel:entries channel="membership" author_id="CURRENT_USER" status="not closed" limit="1"}
    {category_description}
    {if no_results}
    There are no postings for this phase at this time.
    {/if}
    Here is a list of postings for this phase of your project, starting with the first posting. Click on the entries to review the information and leave comments.
    {/exp:channel:entries}

    All this does is write out “{category_description}”. What am I missing?

    Thanks

  • #2 / May 21, 2012 11:24am

    Boyink!

    5011 posts

    You need your description field to be within the {categories} looping pair for the channel:entries tags.

    Or, use the Category Heading tag instead:

    http://ellislab.com/expressionengine/user-guide/modules/channel/category_heading.html

  • #3 / May 21, 2012 1:36pm

    pmerritt

    24 posts

    Thanks for the quick answer!

  • #4 / May 22, 2012 11:43am

    Shane Eckert

    7174 posts

    Hey pmerritt,

    I am glad to see that Mike was able to help you out!

    If you need anything else, please just let us know by opening a new thread.

    Cheers,

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

ExpressionEngine News!

#eecms, #events, #releases