Using eeSiteKit’s Default Navigation Systems
eeSiteKit provides four different types of navigation for your site:
- drop-down menu row
- sub-navigation (category links)
- breadcrumbs
- dynamic path links (print, tell-a-friend, change-language)
Setting up navigation for your site
The only navigation that requires any manual configuration is the main navigation row’s drop-down menus (or optional tab-only navigation row).
In the Template Management area of the Control Panel, navigate to the template called: engine_main_nav_channels.
Site Name › Templates › Template Management › kit_system/engine_main_nav_channels
Inside the engine_main_nav_channels template, you’ll see we’ve set up a static link to your home page and five custom embed tags. You’ll need one of these custom embed tags for each channel that will have a drop-down menu in your site. You may add more than five if your site calls for them.
{embed='kit_language/{embed:site_language}' template='kit_system/engine_main_nav' weblog='CHANNEL NAME'}
Within each of the custom embed tags you’ll be replacing the words ‘CHANNEL NAME’ with a channel short_name. For example, a custom embed tag for channel called About Us with a short_name of “about-us” will look like this:
{embed='kit_language/{embed:site_language}' template='kit_system/engine_main_nav' weblog='about-us'}
Be very careful not to delete the single quotes when replacing the ‘CHANNEL NAME’ default setting.
If you need a static link (like the home link) you can use the home link code as an example to build from.
Also, to re-order channel menus in your top navigation row, just re-order the custom embed tags in the engine_main_nav_channels template. If you’ve ever had a client want to change the order of a site’s main navigation row after launch, you’ll see just how handy it is to manage the nav this way.
Breadcrumbs: The breadcrumb separator may be set in one place as a variable near the top of the “kit_system/engine_bread_crumbs” template. In the very first line of the code just look for “assign_variable:crumb=” and put whatever separator in between the two single quotes; text or image.
Also, if you want entry titles included in your breadcrumbs, un-comment the little extra bit of code near the bottom of the “kit_system/engine_bread_crumbs” template and remove the text in all caps, which says “OPTIONAL ENTRY TITLE and END OPTIONAL ENTRY TITLE”.
Where’s my navigation?
Before you see any links in the drop-down menus, sub-navigation or breadcrumbs, you must first create an entry and assign it to a category within a channel.
Drop-down menus, sub-navigation and breadcrumbs all share one important rule; they don’t link to empty pages, or stated another way, if there isn’t any content assigned to a category, then there won’t be a link to that category. This prevents dead-end links to empty pages.
This also means that if entries are not assigned to a categories within a channel, that channel’s drop-down menu will not display.
You can still pre-populate categories within the Control Panel before all your content is ready; they just won’t display in your site navigation until there’s actually some content to display.
