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:
@ -157,6 +157,21 @@ class CommentList extends Extension
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
public function onPageNavBuilding(PageNavBuildingEvent $event)
|
||||
{
|
||||
$event->add_nav_link("comment", new Link('comment/list'), "Comments");
|
||||
}
|
||||
|
||||
|
||||
public function onPageSubNavBuilding(PageSubNavBuildingEvent $event)
|
||||
{
|
||||
if($event->parent=="comment") {
|
||||
$event->add_nav_link("comment_list", new Link('comment/list'), "All");
|
||||
$event->add_nav_link("comment_help", new Link('ext_doc/comment'), "Help");
|
||||
}
|
||||
}
|
||||
|
||||
public function onPageRequest(PageRequestEvent $event)
|
||||
{
|
||||
if ($event->page_matches("comment")) {
|
||||
|
Reference in New Issue
Block a user