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:
@ -138,6 +138,21 @@ class Upload extends Extension
|
||||
$event->panel->add_block($sb);
|
||||
}
|
||||
|
||||
|
||||
public function onPageNavBuilding(PageNavBuildingEvent $event)
|
||||
{
|
||||
$event->add_nav_link("upload",new Link('upload'), "Upload");
|
||||
}
|
||||
|
||||
public function onPageSubNavBuilding(PageSubNavBuildingEvent $event)
|
||||
{
|
||||
if($event->parent=="upload") {
|
||||
if (class_exists("Wiki")) {
|
||||
$event->add_nav_link("upload_guidelines", new Link('wiki/upload_guidelines'), "Guidelines");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public function onDataUpload(DataUploadEvent $event)
|
||||
{
|
||||
global $config;
|
||||
|
Reference in New Issue
Block a user