Created
February 2, 2012 01:17
-
-
Save bliswebagency/1720741 to your computer and use it in GitHub Desktop.
Add Categories to Structure Navigation (#eecms)
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{!-- MAKE SURE UNIQUE IDs = YES --} | |
{exp:structure:nav add_level_classes="yes" add_span="yes" add_unique_ids="yes" css_class="nav" css_id="nav_full" current_class="active" include_ul="yes" max_depth="5" mode="full" status="Open"} | |
{!-- This technique uses GWCODE Cats but you could do it the normal way --} | |
{!-- we're hiding the div that contains the stuff we want --} | |
<div style="display:none" id="prod_cats"> | |
{!-- This technique uses GWCODE Cats but you could do it the normal way --} | |
{exp:gwcode_categories channel="products" incl_self="no" cat_id="70"} | |
{!-- The URIs are hard coded (with the exception of the cat id) --} | |
<a href="/site/cat_test/{cat_url_title}">{cat_name}</a> | |
{/exp:gwcode_categories} | |
</div> | |
{!-- IF YOU CHANGE ANY IDs, REFLECT THE CHANGES HERE --} | |
<script> | |
$(function(){ | |
var stuff = $('#prod_cats').html(); | |
$('#nav_full-applications').append(stuff) | |
}); | |
</script> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
FYI: You'll need JQuery to pull this off