Created

Embed URL

HTTPS clone URL

SSH clone URL

You can clone with HTTPS or SSH.

Download Gist

Add Categories to Structure Navigation (#eecms)

View cat_tackon
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29
{!-- 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>

FYI: You'll need JQuery to pull this off

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.