how can i add a new menu item to the default mega theme, i see in the default.master.tpl there is a menu list but no href links .. were is it calling the {links} from?
if you have the latest vanilla code you can do this with a plugin. <?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() {} } That link will be inserted where you see {custom_menu} in the template.
You can also edit the template directly. at the top you can see {dashboard_link} {discussion_link} etc. Just add a <li><a href="whatever">link</a></li> in there. But of course that will break when the theme is updated.
Comments
<?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() {}
}
That link will be inserted where you see {custom_menu} in the template.
You can also edit the template directly. at the top you can see {dashboard_link} {discussion_link} etc. Just add a
<li><a href="whatever">link</a></li>in there. But of course that will break when the theme is updated.