Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#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

#21 2012-03-01 17:34:30

merz1
Member
From: Hamburg
Registered: 2006-05-04
Posts: 994
Website

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

#22 2012-08-22 09:31:47

husainhk
Member
From: Dubai, UAE
Registered: 2007-08-12
Posts: 105
Website

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

#23 2012-08-22 09:35:14

husainhk
Member
From: Dubai, UAE
Registered: 2007-08-12
Posts: 105
Website

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

#24 2014-01-22 21:40:38

etc
Developer
Registered: 2010-11-11
Posts: 5,680
Website GitHub

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

Board footer

Powered by FluxBB