Textpattern CMS support forum
You are not logged in. Register | Login | Help
- Topics: Active | Unanswered
#1 2007-12-29 19:27:59
- jpdupont
- Member
- Registered: 2004-10-01
- Posts: 752
Sections/categories/titles 3 level navigation problem
Hello,
In build a new site with 3 navigation levels.
On the top : a vertical menu with sections.
Below, a horizontal menu with the categories who belong to the selected section. Created by the cbs_category_list plugin.
Below, a vertical menu with the titles of the articles tagged with the selected category.
See an active section “asbl” here
When a user clic on the section “asbl” (Qui sommes-nous ?), the horizontal menu is correctly filled.
A sticky article who belongs to the section is displayed.
<txp:if_category>
<txp:article limit=1 />
<txp:else />
<txp:article status=“sticky” limit=1 />
</txp:if_category>
<txp:if_individual_article>
<txp:article />
</txp:if_individual_article>
If a user click on a category, the last article of category is displayed and in the second vertical menu, the list of the articles who belongs to the category are displayed.
<div id=“menuarticles”>
<txp:if_category>
<ul>
<txp:article limit=99999 form=“listarticles” />
</ul>
<txp:else />
<txp:if_individual_article>
<ul>
<txp:related_articles limit=99999 break=“li” /><!—- I don’t want to use related_articles here! —>
</ul>
</txp:if_individual_article>
</txp:if_category>
</div>
My problem :
When I click on the titles of the articles, the article is displayed with the if_individual_article part of the code above.
On the second vertical menu, at this moment, I lost the items (because the category is lost).
I try article_custom or chh_article_custom with category=”?” without success. The only tag who seems good is related_articles, but here I lost the active article. I try asy_wondertag to set txp:category without success. At this time txp:category is empty…
My question : how get at this time and at this place all the articles who belongs to the same category as the article displayed ?
On my sample, first and last categories have more than one article.
Thanks for the help !
Offline
Re: Sections/categories/titles 3 level navigation problem
I haven’t tried this but what about something like <txp:asy_wondertag><txp:article_custom limit="9999" form="listarticles" section="<txp:section />" category="<txp:category1 />" /></txp:asy_wondertag>
?
Stuart
In a Time of Universal Deceit
Telling the Truth is Revolutionary.
Offline
#3 2007-12-30 07:57:25
- jpdupont
- Member
- Registered: 2004-10-01
- Posts: 752
Re: Sections/categories/titles 3 level navigation problem
Fine Stuart !
Works now as expected.
Offline