Textpattern CMS support forum
You are not logged in. Register | Login | Help
- Topics: Active | Unanswered
Pages: 1
#1 2008-09-15 13:14:38
- roelof
- Member
- Registered: 2005-03-27
- Posts: 647
menu problem
hello,
I have this form :
<txp:if_different>
<txp:category1 /><br />
</txp:if_different>
<txp:if_different>
<a rel=“nofollow” href=”<txp:site_url />?c=<txp:category1 />&month=<txp:posted format=”%Y-%m” />”><txp:posted format="%B" /></a>
</txp:if_different>
And in my page looks like this :
<txp:article_custom sort="Posted ASC" listform="myform" />
But my problem is that i have a guestbook without the months.
Now it looks like this :
Zwangerschap
---- maart
--- april
Gastenboek
--- september.
But i must look like this :
Zwangerschap
---- maart
--- april
Gastenboek.
I tried to make a category guestbook but i wont work.
How can i make my form only work with selected categories.
Roelof
Last edited by ruud (2008-09-15 15:29:05)
Offline
#2 2008-09-15 15:29:53
- els
- Moderator
- From: The Netherlands
- Registered: 2004-06-06
- Posts: 7,458
Re: menu problem
Hi Roelof,
You can do this on the page template:
<txp:article_custom category="zwangerschap,evt-andere-categorie(en)" sort="Posted asc" listform="myform" />
<txp:article_custom category="gastenboek,evt-andere-categorie(en)" sort="Posted asc" listform="myotherform" />
and form ‘myotherform’ could be
<a href="<txp:site_url />?c=<txp:category1 />"><txp:category1 title="1" /></a><br />
(If ‘gastenboek’ is a section and not a category, you can do the same using section. The category
and section
attributes in article_custom can take comma separated lists since 4.0.6.)
Offline
#3 2008-09-16 06:35:29
- roelof
- Member
- Registered: 2005-03-27
- Posts: 647
Re: menu problem
Thank you Els,
I could not image that the solution would be so simple.
Roelof
Offline
#4 2008-09-16 19:12:23
- roelof
- Member
- Registered: 2005-03-27
- Posts: 647
Re: menu problem
Sorry, i ran into other problems.
what i want is a menu like this :
<DIV class=menu>
<UL>
<LI><A href="http://www.cssplay.co.uk/index.html">Item 1</A> </LI>
<LI><A href="http://www.cssplay.co.uk/menus/flyout2.html#nogo">Item 2</A>
</LI>
<LI class=sub><A href="http://www.cssplay.co.uk/menus/flyout2.html#nogo">Item
3 »<!--[if IE 7]><!--></A><!--<![endif]--><!--[if lte IE 6]><table><tr><td><![endif]-->
<UL>
<LI><A href="http://www.cssplay.co.uk/index.html">Item 3a</A> </LI>
<LI class=sub><A
href="http://www.cssplay.co.uk/menus/flyout2.html#nogo">Item 3b »<!--[if IE 7]><!--></A><!--<![endif]--><!--[if lte IE 6]><table><tr><td><![endif]-->
<UL>
<LI><A href="http://www.cssplay.co.uk/index.html">Item 3bi</A> </LI>
<LI><A href="http://www.cssplay.co.uk/menus/flyout2.html#nogo">Item
3bii</A> </LI>
<LI class=sub><A
href="http://www.cssplay.co.uk/menus/flyout2.html#nogo">Item 3biii »<!--[if IE 7]><!--></A><!--<![endif]--><!--[if lte IE 6]><table><tr><td><![endif]-->
<UL>
<LI><A href="http://www.cssplay.co.uk/menus/flyout2.html#nogo">Item
3biii-1</A> </LI>
<LI><A href="http://www.cssplay.co.uk/menus/flyout2.html#nogo">Item
3biii-2</A> </LI>
<LI><A href="http://www.cssplay.co.uk/menus/flyout2.html#nogo">Item
3biii-3</A> </LI>
<LI><A href="http://www.cssplay.co.uk/menus/flyout2.html#nogo">Item
3biii-4</A>
</LI></UL><!--[if lte IE 6]></td></tr></table></a><![endif]--></LI></UL><!--[if lte IE 6]></td></tr></table></a><![endif]--></LI>
<LI><A href="http://www.cssplay.co.uk/menus/flyout2.html#nogo">Item 3c</A>
</LI></UL><!--[if lte IE 6]></td></tr></table></a><![endif]--></LI>
<LI><A href="http://www.cssplay.co.uk/menus/flyout2.html#nogo">Item 4</A>
</LI>
<LI><A href="http://www.cssplay.co.uk/menus/flyout2.html#nogo">Item 5</A>
</LI>
<LI><A href="http://www.cssplay.co.uk/menus/flyout2.html#nogo">Item 6</A>
</LI></UL></DIV></DIV><!-- end of info -->
I now have a form like this :
<txp:if_different>
<li>
<A href="http://www.tamarawobben.nl/index.php#nogo">
<txp:category1 /></a>
</li>
<ul>
</txp:if_different>
<txp:if_different>
<li>
<a rel=“nofollow” href=”<txp:site_url />?c=<txp:category1 />&month=<txp:posted format=”%Y-%m” />”><txp:posted format="%B" /></a>
</li>
</ul>
</txp:if_different>
But now everything is a level 1.
What do i have to do to make the menu like above.
Roelof
(Edit: How do I post tags and code on the forum? :) -Els)
Last edited by els (2008-09-16 22:35:51)
Offline
#5 2008-09-16 22:40:27
- els
- Moderator
- From: The Netherlands
- Registered: 2004-06-06
- Posts: 7,458
Re: menu problem
Like I said before a couple of times ;) creating nested lists with if_different is not possible without some ugly workaround. It might be easier to handcode your categories (first level), and use an article form for the sublevels.
Offline
Pages: 1