PDA

View Full Version : Site Navigation Enhancement


smithxxl
01-25-2008, 12:32 AM
I wanted to use the template conditionals in the navigationbits template, but the navigation.php processed entries differently with nav links verses vba pages. A slight modification to navigation.php not only helps with the navigationbits template conditionals, but also will allow "wrapped" or "integrated" pages to be highlighted.

Basically, the new variable used is bool $ncurpage. Works great for me. Plus, with $ncurpage available, the "strong" tags and condition could be moved to the navigationbits template in a template conditional. Would you please add this enhancement to the next revision of vBadvanced, it would be much appreciated. Keep up the great work!!!!!

Brad Smith
http://www.stompfest.com

Unix Diff:31a32
> $ncurpage = ($npageid == $pages['pageid']);
49c50
< $title = ($npageid == $pages['pageid']) ? '<strong>' . $npage['title'] . '</strong>' : $npage['title'];
---
> $title = $ncurpage ? '<strong>' . $npage['title'] . '</strong>' : $npage['title'];
64d64
< $title = $navlinks['text'];
65a66,68
> $ncurpage = ((parse_url($link, PHP_URL_PATH) . parse_url($link, PHP_URL_QUERY)) == $vbulletin->scriptpath);
>
> $title = $ncurpage ? '<strong>' . $navlinks['text'] . '</strong>' : $navlinks['text'];