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.

Displaying category description in vanilla 2

edited August 2010 in Vanilla 2.0 - 2.8
Hi,

Is anyone know how show category description?

Comments

  • edited August 2010
    Category descriptions will be displayed if you're using a theme that supports them, I think.
  • edited June 2013

    ok. here's how I just did it

    in the file vanilla-core-2-0-18-8/applications/vanilla/views/categories/all

    there's a line 49 that looks like this

    <div class="ItemContent Category">'.Gdn_Format::Text($Category->Name).'</div>'

    just follow it with

    .'<div>' .$Category->Description .'</div>'

    then pour yourself a Mug Old Fashioned Root Beer....

    oh, I couldn't find any theme that supports them. And with this mod, every theme will now support them.

  • TamaTama ✭✭✭

    @robertburkhalter said:
    oh, I couldn't find any theme that supports them. And with this mod, every theme will now support them.

    You can do theme overrides :) Simply take the file you want, copy it and place it in your theme views folder .So for example if you got it from applications/vanilla/views/categories/all the directory would be /themes/<themename>/views/categories/all

    There was an error rendering this rich post.

  • @robertburkhalter

    if you have anything but 1 for max depth - it shows the description in every theme I tried without your change

    $Configuration['Vanilla']['Categories']['MaxDisplayDepth'] = '3';
    
     as long as this shows FALSE (not root headings). 
    $Configuration['Vanilla']['Categories']['DoHeadings'] = 'FALSE';
    

    I may not provide the completed solution you might desire, but I do try to provide honest suggestions to help you solve your issue.

  • Are you saying, that with the MaxDisplayDepth set at anything but 1, when any user clicks on the link labeled "Categories", all the categories and their descriptions are displayed without my fix ?

  • peregrineperegrine MVP
    edited June 2013

    @robertburkhalter said:
    Are you saying, that with the MaxDisplayDepth set at anything but 1, when any user clicks on the link labeled "Categories", all the categories and their descriptions are displayed without my fix ?

    Yes, I am saying with the two config statements set above the descriptions display on

    index.php?p=/categories/all

    I may not provide the completed solution you might desire, but I do try to provide honest suggestions to help you solve your issue.

Sign In or Register to comment.