forked from Cavemanon/cavepaintings
Implemented a nav link generating system so that extension power what shows up in the menus rather than being hard-coded in the themes.
This commit is contained in:
@@ -176,6 +176,21 @@ class Wiki extends Extension
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
public function onPageNavBuilding(PageNavBuildingEvent $event)
|
||||
{
|
||||
$event->add_nav_link("wiki",new Link('wiki'), "Wiki");
|
||||
}
|
||||
|
||||
|
||||
public function onPageSubNavBuilding(PageSubNavBuildingEvent $event)
|
||||
{
|
||||
if($event->parent=="wiki") {
|
||||
$event->add_nav_link("wiki_rules", new Link('wiki/rules'), "Rules");
|
||||
$event->add_nav_link("wiki_help", new Link('ext_doc/wiki'), "Help");
|
||||
}
|
||||
}
|
||||
|
||||
public function onWikiUpdate(WikiUpdateEvent $event)
|
||||
{
|
||||
global $database;
|
||||
|
Reference in New Issue
Block a user