Vanilla open source was terminated 1 January 2025 by Higher Logic. See this announcement for more information.
Adding a link to the top menu

So this should be a functioning plugin:
It looks to me like I'm using the API correctly, and it works great with the default vanilla theme. It does not work with other (approved) themes like Vanilla MEGA or Joie, which seem to be using a smarty template with a {custom_menu} tag. I can't tell whether the core is broken or whether the themes just need updating. Either way something ain't right here. Those themes should not be approved if they don't follow the API rules.
Can anyone tell me what I'm doing wrong?
<?php
$PluginInfo['JustAMenuLink'] = array(
'Description' => 'Adds a link to the top menu.',
'Version' => '1.0',
'Author' => 'ithcy',
'AuthorEmail' => 'blah@example.com',
'AuthorUrl' => 'http://example.com'
);
class JustAMenuLink implements Gdn_IPlugin {
public function Base_Render_Before(&$Sender) {
$Sender->Menu->AddLink('Blah', T('Blah'), '/blah/', FALSE);
}
public function Setup() {
//nope
}
}
It looks to me like I'm using the API correctly, and it works great with the default vanilla theme. It does not work with other (approved) themes like Vanilla MEGA or Joie, which seem to be using a smarty template with a {custom_menu} tag. I can't tell whether the core is broken or whether the themes just need updating. Either way something ain't right here. Those themes should not be approved if they don't follow the API rules.
Can anyone tell me what I'm doing wrong?
Tagged:
0
Comments
Vanilla Forums COO [GitHub, Twitter, About.me]
This will come out in the next release.
got it from unstable, works great. Thanks again!