[Directory] Fixup directory plugin
This commit is contained in:
parent
cc9f2d6ff2
commit
483ac38888
|
@ -32,8 +32,9 @@ class Directory extends Module
|
||||||
*/
|
*/
|
||||||
public function onAddRoute(RouteLoader $r)
|
public function onAddRoute(RouteLoader $r)
|
||||||
{
|
{
|
||||||
$r->connect('actors', '/actors', [Controller\Directory::class, 'actors']);
|
$r->connect('directory_actors', '/actors', [Controller\Directory::class, 'actors']);
|
||||||
$r->connect('groups', '/groups', [Controller\Directory::class, 'groups']);
|
$r->connect('directory_groups', '/groups', [Controller\Directory::class, 'groups']);
|
||||||
|
|
||||||
return Event::next;
|
return Event::next;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -46,16 +47,8 @@ class Directory extends Module
|
||||||
*/
|
*/
|
||||||
public function onStartTwigPopulateVars(array &$vars): bool
|
public function onStartTwigPopulateVars(array &$vars): bool
|
||||||
{
|
{
|
||||||
$vars['main_nav_tabs'] = [
|
$vars['main_nav_tabs'][] = ['title' => 'Actors', 'route' => 'directory_actors'];
|
||||||
[
|
$vars['main_nav_tabs'][] = ['title' => 'Groups', 'route' => 'directory_groups'];
|
||||||
'title' => 'Actors',
|
|
||||||
'route' => 'actors',
|
|
||||||
],
|
|
||||||
[
|
|
||||||
'title' => 'Groups',
|
|
||||||
'route' => 'groups',
|
|
||||||
],
|
|
||||||
];
|
|
||||||
|
|
||||||
return Event::next;
|
return Event::next;
|
||||||
}
|
}
|
||||||
|
|
|
@ -91,11 +91,13 @@
|
||||||
<li>
|
<li>
|
||||||
<a href="{{ path('main_all') }}" class='hover-effect {{ active('main_all') }}'>Network</a>
|
<a href="{{ path('main_all') }}" class='hover-effect {{ active('main_all') }}'>Network</a>
|
||||||
</li>
|
</li>
|
||||||
{% for tab in main_nav_tabs %}
|
{% if main_nav_tabs is defined %}
|
||||||
|
{% for tab in main_nav_tabs %}
|
||||||
<li>
|
<li>
|
||||||
<a href="{{ path(tab['route']) }}" class='hover-effect {{ active(tab['route']) }}' >{{ tab['title'] }}</a>
|
<a href="{{ path(tab['route']) }}" class='hover-effect {{ active(tab['route']) }}' >{{ tab['title'] }}</a>
|
||||||
</li>
|
</li>
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
|
{% endif %}
|
||||||
</ul>
|
</ul>
|
||||||
</nav>
|
</nav>
|
||||||
<div class="timeline">
|
<div class="timeline">
|
||||||
|
|
Loading…
Reference in New Issue
Block a user