Textpattern CMS support forum
You are not logged in. Register | Login | Help
- Topics: Active | Unanswered
#16 2008-11-27 07:32:09
- roelof
- Member
- Registered: 2005-03-27
- Posts: 647
Re: how to change my template's so this menu appears
Hello Els,
I ran into another weird problem.
When i do categories , it sorts the months on name.
But i don’t want that.
When i do a sort on the category list it displays no months.
When i do 01-zwangerschap and 02-jaar1 it’s displays no months.
What went wrong ?
Roelof
Edit : When i left everything as it is. So txp displays first 1e levensjaar and after that zwangerschap only zwangerschap has months.
1e levensjaar has no months. 1e levensjaar has one article in september.
Last edited by roelof (2008-11-27 08:41:40)
Offline
#17 2008-11-27 17:05:03
- els
- Moderator

- From: The Netherlands
- Registered: 2004-06-06
- Posts: 7,458
Re: how to change my template's so this menu appears
You might want to have another look at this part of your code:
<txp:article_custom category='<txp:category />' wraptag="ul" break="" class="sub" sortdir="asc">
<txp:if_different>
<li class="subline">
<a href="<txp:site_url />?c=<txp:category1 />&month=<txp:posted format="%Y-%m" />"><txp:posted format="%B" /></a>
</li>
</txp:if_different>
The problem must be in the use of if_different. What do you want to be ‘different’? There is more than one tag inside the conditional that could be different, I don’t think that is possible. For example if you want to display only the month when it is different, this won’t work because you have two other tags (site_url and category1) inside.
Offline
#18 2008-11-27 18:03:59
- roelof
- Member
- Registered: 2005-03-27
- Posts: 647
Re: how to change my template's so this menu appears
Els,
Thank you,
I have to rethink how to solve this.
Roelof
Offline
#19 2008-11-28 08:11:44
- roelof
- Member
- Registered: 2005-03-27
- Posts: 647
Re: how to change my template's so this menu appears
Hai Els,
Last remark from me about this problem.
I have solved it by using the <txp: variable> tag.
in the page template is this code :
<txp:variable name="menu2" value="zwangerschap" />
<txp:variable name="menu3" value="zwangerschap" />
<div class="pro_linedrop">
<txp:output_form form="menu2" />
</li>
</ul>
<txp:variable name="menu2" value="jaar1" />
<txp:variable name="menu3" value="1e levensjaar" />
<txp:output_form form="menu2" />
</li>
</ul>
and form2 is :
<ul class="select">
<li class="line">
<a href="#nogo"><b><txp:variable name="menu3" /> </b>
<!--[if IE 7]><!--></a><!--<![endif]-->
<!--[if lte IE 6]><table><tr><td><![endif]-->
<txp:article_custom category='<txp:variable name="menu2" />' wraptag="ul" break="" class="sub" sortdir="asc" limit="999">
<txp:if_different>
<li class="subline">
<a href="<txp:site_url />?c=<txp:variable name="menu2" />&month=<txp:posted format="%Y-%m" />"><txp:posted format="%B" /></a>
</li>
</txp:if_different>
</txp:article_custom>
</txp:category_list>
And everything works perfect.
Roelof
Offline