Not signed in (Sign In)

Categories

Vanilla 1.1.4 is a product of Lussumo. More Information: Documentation, Community Support.

Help keep Vanilla free:
Welcome Guest!
Want to take part in these discussions? If you have an account, sign in now.
If you don't have an account, apply for one now.
    • CommentAuthormumpitz
    • CommentTime7 days ago edited
     # 1
    Hey,

    I'd like to merge the "Discussions"-Tab and the "Categories"-Tab to one single Tab called "Forum". With the Page Manager Addon I disabled the "Discussions"-Tab and renamed "Categories" to "Forum".
    There is only one flaw left :(
    I want the (new) "Forum"-Tab to be highlighted while I am browsing a discussion. None of the tabs are highlighted right now when browsing the discussions. The "Forum"-Tab is just highlighted when browsing the categories (like its supposed to since its just the renamed "Categories"-Tab ;) ). However, how do I get the tab highlighted when viewing a discussion?

    thanks
  1.  # 2
    You probably won't be able to highlight the "Forum" tab for both of your cases (Browsing Discussion & Browsing Categories), but someone here might have a workaround, I'm not aware of.

    I must admit, when I read the subject of this discussion, I immediately thought the Discussion Overview extension would solve the problem. You might want to give it a try.
    • CommentAuthortimfire
    • CommentTime6 days ago edited
     # 3
    Try this, it should work in conjunction with what you already did (warning untested):

    <?php
    /*
    Extension Name: Change Tab
    Extension Url: n/a
    Description: Changes the current tab
    Version: 0.1
    Author: Timothy Walters Kleinert (aka timfire)
    Author Url: N/A
    */

    if ($Context->SelfUrl == 'index.php' || $Context->SelfUrl == 'comments.php' ) {
    function ChangeTab(&$Menu) {
    $Menu->CurrentTab = 'categories';
    }
    $Context->AddToDelegate('Menu', 'PreRender', 'ChangeTab');
    }
    ?>


    (Pop the code into a file called "default.php" inside a folder, and place the folder in the "extensions/" directory, and then enable like any other extension.)
Add your comments
    Username Password
  • Format comments as