Autonav template using box
Permalink
Hi People.
Can some one help me here.. I have a nice css style drop down menu on my site but it causes issue with touch devices, (no hover)
So I have added a second nav which is displayed when the broswer window is shrunk.
All good I have created a <select> style list with the code as a template below:
Now this works ok and does work well with touch devices. How ever I Have a couple of issues.
1. I can't get the active page to display, as selected.
2. I would like to style the child pages to show what they are under in the list?
Can Any one help with this or have any ideas? (or is their an addon which does this already as i can't see it!
As you can see I have tried adding in a list style option to style them.
And a foreach list to locate the active page.(never work!)
Thanks for the help
Carl Lee
Can some one help me here.. I have a nice css style drop down menu on my site but it causes issue with touch devices, (no hover)
So I have added a second nav which is displayed when the broswer window is shrunk.
All good I have created a <select> style list with the code as a template below:
Now this works ok and does work well with touch devices. How ever I Have a couple of issues.
1. I can't get the active page to display, as selected.
2. I would like to style the child pages to show what they are under in the list?
Can Any one help with this or have any ideas? (or is their an addon which does this already as i can't see it!
<?php defined('C5_EXECUTE') or die(_("Access Denied.")); $navItems = $controller->getNavItems(); //$lists = array('00-Gauge'); //$lists[] = 'Marketplace'; //$lists[] = 'N-Gauge'; ?> <nav> <div class="Select-Nav"> <ul class="nav-header"> <select onchange="if (this.value) window.location.href=this.value"> <option value="" selected="selected">Select Page</option> <?php //foreach($lists as $list) //echo "<option value=\"?$QUERY_STRING&list=$list\"" . ($list == $_GET['list'] ? " selected" : "") . ">" . ucfirst($list) . "</option>" ?>
Viewing 15 lines of 36 lines. View entire code block.
As you can see I have tried adding in a list style option to style them.
And a foreach list to locate the active page.(never work!)
Thanks for the help
Carl Lee