Tips tagged “Navigation”
- Gallery: Drop Down List of Sub Categories Only
-
Posted on July 16, 2009 by Hambo
Do you use Gallery Categories just for organisation and want a drop down navigation that contains only subcategories?
Well here you go!
<form>
<select name="URL" onChange="window.location=this.options[this.selectedIndex].value">
<option value=" ">Category Jump Navigation</option>
{exp:query sql - Make sure to format/code your dynamic lists properly
-
Posted on June 08, 2009 by JonnyUK
This is a very basic ‘mistake’ I often see in various code snippets involving dynamic lists.
In cases where you want to dynamically fill up a list, often people use code similar to the following:
<ul>
{exp:weblog:entries weblog="your_weblog" dynamic="off"}
<li>{title}</li>
{/exp:weblog:entries}
</ul - Highlight the current page in your navigation
-
Posted on June 08, 2009 by JonnyUK
Using the segment variables in your template, you can highlight the current page in your navigation.
For primary pages, this is pretty simple. All you need to do is check segment 1 to see if it matches up with a particular navigation item:
<ul>
<li class="{if "{segment_1}" == ""}selected{/if}">< - Using URL Segments for Dynamic Navigation
-
Posted on June 07, 2009 by Jason Hudnutt
ExpressionEngine allows you to dynamically assign CSS navigation based on arguments passed from the URL segment.
This allows you to use CSS to display the active page based on the URL.
<a href="/about/" class="{if segment_1 == "about"}about about-active{if:else}about{/if}"></a>This is just
- Current Navigation Highlighting
-
Posted on May 29, 2009 by Jonathan Longnecker
An easy way to embed your navigation so it can be reused but pass the “current” class so it highlights for the page you’re on:
<ul>
<li><a
href="./">Home</a></li>
<li><a
href="dont_hire/">Don’t Hire Us</a></li>
<li><a
href="portfolio/">Portfolio</a></li>
</ul>Then when you
