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.

Display category title with the description and all discussions within the category

edited January 2011 in Vanilla 2.0 - 2.8
I’m trying to display the category description on the home page 'categories/discussions' however this home page only shows the category title and discussion, no category description. I have been having a look and the only page that seems display my category description is 'categories/all' however this doesn’t show the discussions. Can anyone help with this?


  • Options
    Howdy. Is "discussions" the name of the category in your case? If what you want is to control the look / layout of the category detail page, you can do so via:

    themes/[your theme name]/views/discussions/index.(tpl|php)

    There is no example index.tpl but you can suss out what is available variable wise by putting a {debug} call in an empty index.tpl template. The simplest way to approach this is to view the source for that page as it is now and then copy that into the template and then convert it to use Smarty variables based on what you see in the {debug} popup. I am currently doing that myself though I have only just started.

    If you go with a PHP version, you would need to replicate "applications/vanilla/views/discussions/index.php" and then adjust whatever helper functions / methods are called to grab and display the category description. If you are literally only adding the description, it will be embedded in a single function likely in the discussions "helper_functions.php" file.

    I am currently working on the index.tpl file myself so will eventually have an example template I can share (likely a week away though).

  • Options
    Hello. Thanks for the reply. In answer to your response: No ‘discussions’ is not the name of the category. On the dashboard under home page there are several home pages that can be chosen as the default, this 'categories/discussions' is one of those home pages I was speaking about. So reading your reply changes are required to code, there isn’t a simple plug-in? All I basically want to achieve is a 'typical' forum lay out, i.e. phpbb where you can view all the categories, sub categories along with the category description and discussions (topics/posts) under the category.
  • Options
    edited January 2011
    Surely there must be a way to do this!

    For example, I created a category called Travel and inside it two sub categories Hotels and Car Hire. If I only add discussions to the sub categories, Travel will show how many post in total in the sidebar but clicking on travel returns no results rather than showing all discussions from the sub categories.
Sign In or Register to comment.