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:
@ -294,6 +294,16 @@ class NumericScore extends Extension
|
||||
}
|
||||
}
|
||||
|
||||
public function onPageSubNavBuilding(PageSubNavBuildingEvent $event)
|
||||
{
|
||||
if($event->parent=="posts") {
|
||||
$event->add_nav_link("numeric_score_day", new Link('popular_by_day'), "Popular by Day");
|
||||
$event->add_nav_link("numeric_score_month", new Link('popular_by_month'), "Popular by Month");
|
||||
$event->add_nav_link("numeric_score_year", new Link('popular_by_year'), "Popular by Year");
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
private function install()
|
||||
{
|
||||
global $database;
|
||||
|
Reference in New Issue
Block a user