- foreach($nav_items as &$nav_item) {
- if($nav_item['filename'] == 'index') {
- $nav_item['filename'] = './';
+ foreach($nav_items as &$item) {
+ $item['basename'] = $item['filename']; # for nav-links as images
+ if($item['filename'] == $basename) {
+ $item['current'] = true;
+ }
+ if($item['filename'] == 'index') {
+ $item['filename'] = './';