Textpattern CMS support forum
You are not logged in. Register | Login | Help
- Topics: Active | Unanswered
#16 2010-10-31 17:43:36
- els
- Moderator

- From: The Netherlands
- Registered: 2004-06-06
- Posts: 7,458
Re: [howto] Nested category->sub-category->article menu
Dimitri wrote:
My idea, i tried to do something like this below but it refuses to work
<li><txp:section name="home" class="<txp:if_section name="home">active</txp:if_section>">Home</txp:section></li>
That wouldn’t work, no. When using tags in tags, use single quotes:
<li><txp:section name="home" class='<txp:if_section name="home">active</txp:if_section>'>Home</txp:section></li>
Offline
#17 2010-10-31 18:09:56
- Dimitri
- Member

- From: Johannesburg
- Registered: 2010-10-31
- Posts: 129
Re: [howto] Nested category->sub-category->article menu
That wouldn't work, no. When using tags in tags, use single quotes:
HIGH FIVE!!!, that what i needed from the beginning.
Sorry, but did you try my example at all?
Yes I tried everything but it wasnt something I was looking for. Thanx so much.
<txp:way_too_cool />
Offline
#18 2012-02-29 10:31:53
- element
- Member
- Registered: 2009-11-18
- Posts: 99
Re: [howto] Nested category->sub-category->article menu
How about 4 levels of navigation? I’m looking for a solution to this problem. Is it even possible?
Example:
Nav1 - Subnav1 - Subnav2 - Subnav3 -- Subsubnav1 -- Subsubnav2 --- Subsubsubnav1 - Subnav4 Nav2
Last edited by element (2012-02-29 10:32:49)
Offline
#19 2012-02-29 11:40:15
- uli
- Moderator

- From: Cologne
- Registered: 2006-08-15
- Posts: 4,316
Re: [howto] Nested category->sub-category->article menu
element wrote:
How about 4 levels of navigation? I’m looking for a solution to this problem.
How about this one?
In bad weather I never leave home without wet_plugout, smd_where_used and adi_form_links
Offline
#20 2012-03-01 12:16:56
- element
- Member
- Registered: 2009-11-18
- Posts: 99
Re: [howto] Nested category->sub-category->article menu
Isn’t there a simpler solution? Seems awfully complicated.
Offline
Re: [howto] Nested category->sub-category->article menu
No, the solution is pretty simple. It only looks complicated because of the repetition of the same elements for every level. Just do it :)
I used it here advokathamburg.de (navigation in left sidebar) and even I understood the data flow.
Get all online mentions of Textpattern via OPML subscription: TXP Info Sources: Textpattern RSS feeds as dynamic OPML
Offline
Re: [howto] Nested category->sub-category->article menu
Hey Markus … I too need a multi-level category menu, but without articles, just like your implementation on http://advokathamburg.de/. Care to share the code needed for this? Thanks so much!
Offline
Re: [howto] Nested category->sub-category->article menu
Ignore me … Sorry, just saw the note on TXP Tips, on what to do when no articles are required :-)
Offline
Re: [howto] Nested category->sub-category->article menu
element wrote #258592:
Isn’t there a simpler solution? Seems awfully complicated.
Before I forget this dirty hack:
<!-- tree form -->
<txp:category title="1" />
<txp:category_list parent='<txp:category />' exclude='<txp:category />' children="0" wraptag="ul" break="li">
<txp:php>echo parse(fetch_form('tree'));</txp:php>
</txp:category_list>
<!-- nested menu -->
<txp:category_list children="0" wraptag="ul" break="li" form="tree" />
Offline