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:
@ -74,4 +74,11 @@ class RandomList extends Extension
|
||||
|
||||
$event->panel->add_block($sb);
|
||||
}
|
||||
|
||||
public function onPageSubNavBuilding(PageSubNavBuildingEvent $event)
|
||||
{
|
||||
if($event->parent=="posts") {
|
||||
$event->add_nav_link("posts_random", new Link('random'), "Shuffle");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user