Vanilla 1 is no longer supported or maintained. If you need a copy, you can get it here.
HackerOne users: Testing against this community violates our program's Terms of Service and will result in your bounty being denied.

about $Menu->AddTab( ..... )

edited August 2006 in Vanilla 1.0 Help
how does "$Menu->AddTab()" use to add a tab in menu ?
please give some example, Thank you.


  • Options
    I find the best way to work out something that's not in the documentation is to find an extension that uses it and work from there. e.g. in the members page extension they use: $Menu->AddTab($Context->GetDefinition('Members'), $Context->GetDefinition('Members'), GetUrl($Configuration, 'extension.php', '', '', '', '', 'PostBackAction=Members'), $Attributes = '', $Position = '50', $ForcePosition = '50'); So you can work out (based on the way $Panel->AddList works - AddListItem($ListName, $Item, $Link, $Suffix = '', $LinkAttributes = '', $Position = '0', $ForcePosition = '0');) that $Menu-AddTab needs the following parameters: $Menu->AddTab($Tabname, $name, $Link, $Attributes, $Position, $ForcePosition); Where: $Tabname is actual name of the tab $Item is the word that appears on it (probably the same as tabname) $Link is where it needs to point to $Attributes I assume lets you put stuff into the anchor tag of the tab $Position tells it where to go in the order $Forceposition tells it whether it HAS to go in that place (incase 2 extensions want to be inthe same position) I'm flying by the seat of my pants here but that should be roughly correct.
  • Options
    this is a quick and dirty howto. thanks, I'm vanilla newbie and I'm going to try this tonight.
  • Options
    Let me know if i went wrong somewhere :)
  • Options
    i haven't tested i used the pagemngr extension and its great... for now ;)
This discussion has been closed.