Please upgrade here. These earlier versions are no longer being updated and have security issues.
HackerOne users: Testing against this community violates our program's Terms of Service and will result in your bounty being denied.
Options

How do I add a description on category page?

By default the category page for each category shows a title. However, I would like to add the category description below the title. Can someone help me with how to do this?

Tagged:

Comments

  • Options
    edited February 2013

    trying to do the same thing too... barely any discussions regarding this

    so far I cam close to this file views/discussions/helper_functions.php around line 165 containing the after breadcrumbs? This is where the category description should be. But as a newb, i'm stuck with any coding I need to do.

  • Options
    vrijvlindervrijvlinder Papillon-Sauvage MVP

    By default the category page for each category shows a title.

    Yes and also shows a description if there is one. You enter the description in the dashboard when you make a new Category, then the description shows under the title in the list of categories in the categories page....

  • Options
    edited February 2013

    @vrijvlinder said:
    Yes and also shows a description if there is one. You enter the description in the dashboard when you make a new Category, then the description shows under the title in the list of categories in the categories page....

    yes .. the description shows UNDER the title in the category pages.... but the OP wants to add another it to the discussion page as well. for example (in order)

    [TITLE OF CATEGORY]

    [DESCRIPTION OF CATEGORY]

    [Then the list of all the discussions pertaining to that category]

  • Options
    AdrianAdrian Wandering Spirit Montreal MVP
    edited April 2013

    I thought I would share what did to make this work

    just add this line below at /discussions/helper_functions.php around line 164

    http://bitbin.it/7nZO2ST3

    (had to post off site, as code formatting did not work)

  • Options
    UnderDogUnderDog MVP
    edited April 2013
    echo '<p><span class="'.$Class.'">', Anchor(Gdn_Format::Text($Breadcrumb['Description']))'</span></p>';
    

    (indent 4 spaces or paste in < pre >< /pre > tags, but I know what you mean about the formatting).

    There was an error rendering this rich post.

  • Options
    AdrianAdrian Wandering Spirit Montreal MVP
    edited April 2013

    @underdog, I figured there had to be a trick as code tags did not work. I should add I forgot a comma in the code:

    echo '<p><span class="'.$Class.'">', Anchor(Gdn_Format::Text($Breadcrumb['Description'])),'</span></p>';
    
  • Options
    hgtonighthgtonight ∞ · New MVP
    edited April 2013

    @UnderDog
    (indent 4 spaces or paste in < pre >< /pre > tags, but I know what you mean about the formatting).

    You can also use three tildes at the beginning and end for Mark down style. ~~~

    Search first

    Check out the Documentation! We are always looking for new content and pull requests.

    Click on insightful, awesome, and funny reactions to thank community volunteers for their valuable posts.

Sign In or Register to comment.