Textpattern CMS support forum
You are not logged in. Register | Login | Help
- Topics: Active | Unanswered
Pages: 1
#1 2014-12-29 11:58:58
- Gallex
- Member
- Registered: 2006-10-08
- Posts: 1,315
multi-level menu
how to add sub-category into this menu code?
<txp:category_list type="article" wraptag="ul" break="li" section='<txp:section />' children="0" parent='<txp:section />' exclude='<txp:section />' sort="name desc">
<txp:category title="1" link="1" section='<txp:section />' />
<txp:category_list wraptag="ul" break="li" children="0" parent='<txp:category />' exclude='<txp:category />'>
<txp:category title="1" link="1" section='<txp:section />' />
</txp:category_list>
</txp:category_list>
Last edited by Gallex (2014-12-29 12:55:46)
Offline
Re: multi-level menu
Hi gallex,
This tip might be slightly more to what you are looking for but it should be of help.
Yiannis
——————————
NeMe | hblack.art | EMAP | A Sea change | Toolkit of Care
I do my best editing after I click on the submit button.
Offline
#3 2014-12-29 13:11:00
- Gallex
- Member
- Registered: 2006-10-08
- Posts: 1,315
Re: multi-level menu
colak wrote #286923:
This tip might be slightly more to what you are looking for but it should be of help.
can’t figure out how it should look like without articles…..
my total code actually:
<txp:section_list default_title='<txp:text item="Home" />' include_default="1" sections="news,products" wraptag="ul" break="" class="">
<li<txp:if_section name='<txp:section />'><txp:if_search><txp:else /><txp:if_category><txp:else /><txp:if_author><txp:else /> class="active"</txp:if_author></txp:if_category></txp:if_search></txp:if_section>><txp:section title="1" link="1" />
<txp:category_list type="article" wraptag="ul" break="li" section='<txp:section />' children="0" parent='<txp:section />' exclude='<txp:section />' sort="name desc">
<txp:category title="1" link="1" section='<txp:section />' />
<txp:category_list wraptag="ul" break="li" children="0" parent='<txp:category />' exclude='<txp:category />'>
<txp:category title="1" link="1" section='<txp:section />' />
</txp:category_list>
</txp:category_list></li>
</txp:section_list>
Offline
Re: multi-level menu
Not tested but I think that the code below should work
<ul id="menu">
<li><a href="<txp:site_url />"><txp:site_name /></a></li>
<txp:category_list children="0" break="li">
<txp:category title="1" link="1" />
<txp:category_list parent='<txp:category />' exclude='<txp:category />' break="" wraptag="ul">
<li><txp:category title="1" link="1" />
</txp:category_list>
</txp:category_list>
</ul>
Yiannis
——————————
NeMe | hblack.art | EMAP | A Sea change | Toolkit of Care
I do my best editing after I click on the submit button.
Offline
#5 2014-12-30 10:03:59
- Gallex
- Member
- Registered: 2006-10-08
- Posts: 1,315
Re: multi-level menu
actually, i ment more deeper sub-levels. that easy it was: ;)
...
<txp:category_list type="article" wraptag="ul" break="li" section='<txp:section />' children="0" parent='<txp:section />' exclude='<txp:section />' sort="name desc" class="">
<txp:category title="1" link="1" section='<txp:section />' />
<txp:category_list wraptag="ul" break="li" children="0" parent='<txp:category />' exclude='<txp:category />' class="">
<txp:category title="1" link="1" />
<txp:category_list wraptag="ul" break="li" children="0" parent='<txp:category />' exclude='<txp:category />' class="">
<txp:category title="1" link="1" />
</txp:category_list>
</txp:category_list>
</txp:category_list>
...
Offline
Re: multi-level menu
How many category sub-levels do you have?
Yiannis
——————————
NeMe | hblack.art | EMAP | A Sea change | Toolkit of Care
I do my best editing after I click on the submit button.
Offline
#7 2014-12-30 13:12:10
- Gallex
- Member
- Registered: 2006-10-08
- Posts: 1,315
Re: multi-level menu
Offline
Pages: 1