Leaving out all the <li>
's and CSS styling you might want to use, you could try something like this in your navbar.
if ($this->params['action'] == 'page1') {
echo "menu item 1";
echo "menu item 1";
echo "menu item 1";
} elseif ($this->params['action'] == 'page2') {
echo "menu item A";
echo "menu item B";
echo "menu item C";
} else {
echo "something else A";
echo "something else B";
echo "something else C";
}
Basically, if you want to access your current action in a view, you can get it via $this->params['action']
. To see other variables that are available, try using debug($this->params)
.