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.

Panel not displaying consistently

On my search results page, custom pages, and a few others, all I see in the sidebar is the search box. No Categories, or any of the other modules I have on the home page. Help!

Comments

  • @charliepratt

    Which version of Vanilla are you using?

    I think that is the default setup.

    If you want to add elements to specific pages, you can do it via custom.css in your custom theme folder.

  • I'm using 2.0.18.4.

    I set my home page to /discussions, and it displays the sidebar that I'd like to display everywhere else on the site. Any ideas on how to duplicate that?

  • In my theme's default.master.tpl file, there is this -

    <div id="Panel"><div class="SearchBox">{searchbox}</div>{asset name="Panel"}</div>

    ... But it's only rendering the Search box.

  • hgtonighthgtonight MVP
    edited May 2013

    The things you see in the panel are called modules. They are defined per controller. You can add them through your themehooks file much like you would in a plugin. You would most likely use $Sender->AddModule('ModuleName');

    EDIT

    Keep in mind that most modules need some type of data set. Are there any specific modules you want?

    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.

  • I would like to display at least:

    Search
    Categories
    Bookmarks

  • hgtonighthgtonight MVP
    edited May 2013

    When placed in your theme hooks file, this will add the categories and bookmarked module on your custom pages, search, and messages:

    public function PluginController_Render_Before($Sender) {
        $Sender->ApplicationFolder = 'vanilla';
        $Sender->AddModule('CategoriesModule');
        $Sender->AddModule('BookmarkedModule');
        $Sender->ApplicationFolder = 'dashboard';
    }
    
    public function SearchController_Render_Before($Sender) {
        $Sender->ApplicationFolder = 'vanilla';
        $Sender->AddModule('CategoriesModule');
        $Sender->AddModule('BookmarkedModule');
        $Sender->ApplicationFolder = 'dashboard';
    }
    
    public function MessagesController_Render_Before($Sender) {
        $Sender->ApplicationFolder = 'vanilla';
        $Sender->AddModule('CategoriesModule');
        $Sender->AddModule('BookmarkedModule');
        $Sender->ApplicationFolder = 'conversations';
    }
    

    EDIT You can add any controller you want. You only have to change the application folder if the module you want is originally from a different application (remember that Vanilla Forums is actually a collection of 3 applications for the Garden framework). This information is easily figured out by looking at your /applications/modules folder.

    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.

  • Excellence. Thank you so much.

Sign In or Register to comment.