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.

How to show category description below the category?

After initial set-up of the default Vanilla theme, the dashboard enables a category and description for that category to be created but only the category is displayed live.

I have searched, read, and tried in vain to have my categories show the description underneath.

So far, I created and applied my new theme from the default (got there). Did the "create a custom.css" thing. Followed instructions from old postings to alter the php file under discussions etc but these posts "solutions" have different code to what I'm seeing now in the php and just confuse the heck out of me.

Bottom line is this newbie is stuck. I quite like the default style just would like this one change.

Can anyone hold my hand please? :)

Best Answers

  • Answer ✓

    forum\applications\vanilla\views\modules\categories.php

    row 36

    replace echo command to

    echo Wrap(Anchor(($Category->Depth > 1 ? '↳ ' : '').Gdn_Format::Text($Category->Name),
    '/categories/'.rawurlencode($Category->UrlCode)), 'strong').
    '<br><span style="float:left; font-size: 10px; color:gray">'.$Category->Description.'</span>'.
    '<span class="Count">'.number_format($Category->CountAllDiscussions).'</span>';
    
    sufficientme
  • hbfhbf wiki guy? MVP
    Answer ✓

    just a reminder: modifications to core files will be lost during any upgrade.

    sufficientme

Answers

  • Answer ✓

    forum\applications\vanilla\views\modules\categories.php

    row 36

    replace echo command to

    echo Wrap(Anchor(($Category->Depth > 1 ? '↳ ' : '').Gdn_Format::Text($Category->Name),
    '/categories/'.rawurlencode($Category->UrlCode)), 'strong').
    '<br><span style="float:left; font-size: 10px; color:gray">'.$Category->Description.'</span>'.
    '<span class="Count">'.number_format($Category->CountAllDiscussions).'</span>';
    
    sufficientme
  • Thank you soooo much! I really appreciate you helping me out - my neck was getting sore sittign here for hours trying to figure it out :) Cheers

  • hbfhbf wiki guy? MVP
    Answer ✓

    just a reminder: modifications to core files will be lost during any upgrade.

    sufficientme
  • Ok, understood, thanks.

  • Help. I tired the above modification, but when I set my homepage to "All Categories" or "Categories & Discussions" I get a BONK. If I set my homepage "All Discussions" it works fine.
    I tried restoring the original categories.php file, but I am still getting the same problem.
    Any ideas or suggestions?

  • ShadowdareShadowdare r_j MVP
    edited November 2013

    @Texdkr, welcome to the community.

    Click this link to find out how to see what the actual error is: http://vanillawiki.homebrewforums.net/index.php/Bonk_Errors

    I recommend starting a new discussion with the actual error pasted in between three tildes (~~~) before and after the actual error. Be sure to leave your Vanilla version number as well.

    Add Pages to Vanilla with the Basic Pages app

  • @Shadowdare, thank you. Using the debug I found the error was occurring due to the Tagging plug in. When I disabled the tagging plugin, the "All Categories" home page started loading with out error.

    Shadowdarehgtonight
Sign In or Register to comment.