forked from Public/pics
41 lines
834 B
PHP
41 lines
834 B
PHP
<?php
|
|
/*****************************************************************************
|
|
* MainMenu.php
|
|
* Contains the main navigation logic.
|
|
*
|
|
* Kabuki CMS (C) 2013-2023, Aaron van Geffen
|
|
*****************************************************************************/
|
|
|
|
class MainMenu extends Menu
|
|
{
|
|
public function __construct()
|
|
{
|
|
$this->items = [
|
|
[
|
|
'uri' => '/',
|
|
'label' => 'Albums',
|
|
],
|
|
[
|
|
'uri' => '/people/',
|
|
'label' => 'People',
|
|
],
|
|
[
|
|
'uri' => '/timeline/',
|
|
'label' => 'Timeline',
|
|
],
|
|
];
|
|
|
|
foreach ($this->items as $i => $item)
|
|
{
|
|
if (isset($item['uri']))
|
|
$this->items[$i]['url'] = BASEURL . $item['uri'];
|
|
|
|
if (!isset($item['subs']))
|
|
continue;
|
|
|
|
foreach ($item['subs'] as $j => $subitem)
|
|
$this->items[$i]['subs'][$j]['url'] = BASEURL . $subitem['uri'];
|
|
}
|
|
}
|
|
}
|