Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- {exp:structure_entries
- parent="/{segment_1}/{segment_2}/"
- depth="2"}
- {if {depth} == 1}
- {if {count} == 1}<ul class="nav-side">{/if}
- <li class="entry-{entry_id}{if {current_page}} active{/if}{if {current_parent}} parent-active{/if}{if {count} == 1 && embed:first_class != "no"} first{/if}{if {last_child} == 1 && embed:last_class != "no"} last{/if}">
- <a href="{page_uri}" rel="{if cf_pages_redirects_new}window{/if} {if cf_pages_redirect_warning}warning{/if}">{hidden_snippets_title}</a>
- {if {children_total} == 0}{!-- No Children - so close markup --}
- </li>
- {/if}
- {if:else}{!-- Children (not top level) --}
- {if {sibling_count} == 1}{!-- First child - so open markup --}
- <ul class="level-{depth}">
- {/if}
- <li class="entry-{entry_id}{if {current_page}} active{/if}{if {current_parent}} parent-active{/if}{if {sibling_count} == 1 && embed:first_class != "no"} first{/if}{if {last_sibling} == 1 && embed:last_class != "no"} last{/if}">
- <a href="{page_uri}" rel="{if cf_pages_redirects_new}window{/if} {if cf_pages_redirect_warning}warning{/if}">{hidden_snippets_title}</a>
- {close_markup}
- {if {total_children} == 0}
- </li>
- {/if}
- {if {last_sibling} && {sibling_count} == {sibling_total}}
- </ul><!-- End of level{depth} closing tags -->
- </li>
- {/if}
- {/close_markup}
- {/if}
- {if {depth} == 1}
- {if {last_sibling} && {sibling_count} == {sibling_total}}</ul>{/if}
- {/if}
- {/exp:structure_entries}
Add Comment
Please, Sign In to add comment