Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#1 2006-09-03 23:43:51

slabanosa
Member
From: Silva Carbonaria
Registered: 2004-06-01
Posts: 57

site navigation: sections or categories ?

On a site I try to use categories in sections to mimic subsections like this

section defaults to latest article in a 1^st^ category section submenu
  1. link to 1^st^ category showing 1 article and opening a list of more in the submenu using conditional tags
  2. link to 2^nd^ category showing list of static articles
  3. link to 3^nd^ category showing 1 article and opening a list of more in the submenu using conditional tags
  4. link to 4^th^ category showing 1 article and opening a list of more in the submenu using conditional tags
  5. link to 5^th^ category showing 1 article (could turn out to be a static art. only)

I wonder if the above makes sense at all or if I should be using sections instead for link 1,3 and 4 ?

edited for focus

Last edited by slabanosa (2006-09-09 15:03:57)

Offline

#2 2006-09-09 15:20:25

slabanosa
Member
From: Silva Carbonaria
Registered: 2004-06-01
Posts: 57

Re: site navigation: sections or categories ?

ok I’ve been futzing with this but I can’t make it work properly and would rather not be using a plugin if any

this first bit works the way I expected it to: subnav opens/closes under each category title when clicked
<code>
<ul id=“sousMenu”>
<li><txp:category link=“1” title=“1” name=“x” />
<txp:if_category name=“x” number=“1”>
<txp:article_custom form=“menu_list” limit=“20” category=“x” listform=“menu_list” />
<txp:else />
</txp:if_category>
</code>
menulist form is just
<ul><li> <txp:permlink><txp:title /></txp:permlink></li></ul>

this second bit seems necessary for the menu to remain open once an article has been selected, but since I can’t put an attribute for if_individual_article this results in opening all the submenus once in article view

<code>
<txp:if_individual_article>
<txp:article_custom form=“menu_list” limit=“20” category=“x” listform=“menu_list” />
<txp:else />
</txp:if_individual_article>
</li>
</code><br />

is there a way to achieve this, so that when an article is selected only the subnav for that category show ?
or am I headed the wrong route and should be using sth totally different instead ?

Last edited by slabanosa (2006-09-09 15:22:54)

Offline

Board footer

Powered by FluxBB