Textpattern CMS support forum
You are not logged in. Register | Login | Help
- Topics: Active | Unanswered
#13 2008-11-26 14:51:23
- roelof
- Member
- Registered: 2005-03-27
- Posts: 647
Re: how to change my template's so this menu appears
Hai Els,
I found this myself.
I changed the form cat-list.
But i have now a problem i can’t solve.
I have this form :
<div class="pro_linedrop">
<ul class="select">
<txp:category_list wraptag="" exclude="Category1,gallery,voorpagina" form="cat_list" class=""/>
<txp:if_category name='<txp:category />'>
<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>
</txp:if_category>
</txp:custom_article>
</li>
</txp:if_category>
</txp:section_category>
</ul>
</div>
But i saw that txp now makes only the list of categories and i need that txp runs the whole script.
So the categories and the months are in the list.
Do you have a clue how to achieve this.
Roelof
Edit : When i remove this line
<txp:if_category name='<txp:category />'>
then the output is good , only I get a error – message on custom article.
Last edited by roelof (2008-11-26 18:19:41)
Offline
#14 2008-11-26 20:12:30
- els
- Moderator
- From: The Netherlands
- Registered: 2004-06-06
- Posts: 7,458
Re: how to change my template's so this menu appears
roelof wrote:
only I get a error – message on custom article.
</txp:custom_article>
should be </txp:article_custom>
.
And if you remove <txp:if_category>
don’t forget to also remove the closing tag </txp:if_category>
.
Offline
#15 2008-11-26 21:06:22
- roelof
- Member
- Registered: 2005-03-27
- Posts: 647
Re: how to change my template's so this menu appears
Els,
Thank you.
Menu works perfect now.
See http://test2.tamarawobben.nl
Roelof
Offline
#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