Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#13 2012-10-12 20:06:44

els
Moderator
From: The Netherlands
Registered: 2004-06-06
Posts: 7,458

Re: How to customize <li> in <txp:section_list> ... !?

Does this work?

Edit: no it doesn’t. Hang on.

Last edited by els (2012-10-12 20:08:14)

Offline

#14 2012-10-12 20:15:50

els
Moderator
From: The Netherlands
Registered: 2004-06-06
Posts: 7,458

Re: How to customize <li> in <txp:section_list> ... !?

This?

<txp:section_list default_title='<txp:text item="home" />' include_default="1" wraptag="ul" break="" sections="thework,aanbod,info">
<txp:variable name="list_item" value='<txp:section />' />
  <li class="<txp:if_variable name="list_item" value="default">home<txp:else /><txp:section /></txp:if_variable><txp:if_section name='<txp:section />'> active</txp:if_section>"><a href="<txp:section url="1" />"><txp:section title="1" /></a></li>
</txp:section_list>

(Edit: d’oh. if_sections attribute is name, not value )

Last edited by els (2012-10-12 22:50:58)

Offline

#15 2012-10-12 22:06:54

RedFox
Member
From: Netherlands
Registered: 2005-03-25
Posts: 809
Website

Re: How to customize <li> in <txp:section_list> ... !?

Sorry …

Tag foutmelding <txp:if_section value=’<txp:section />’> -> Textpattern Notice: niet bestaand tagattribuut: value bij het verwerken van module “geen” op pagina “default”
Tag foutmelding <txp:if_section value=’<txp:section />’> -> Textpattern Notice: niet bestaand tagattribuut: value bij het verwerken van module “geen” op pagina “default”
Tag foutmelding <txp:if_section value=’<txp:section />’> -> Textpattern Notice: niet bestaand tagattribuut: value bij het verwerken van module “geen” op pagina “default”
Tag foutmelding <txp:if_section value=’<txp:section />’> -> Textpattern Notice: niet bestaand tagattribuut: value bij het verwerken van module “geen” op pagina “default”

[edit]
Ahhhh … <txp:if_section name='<txp:section />'> … :)

To all … this works >

<txp:section_list default_title=’<txp:text item=“home” />’ include_default=“1” wraptag=“ul” break=”“ sections=“thework,aanbod,info”>
<txp:variable name=“list_item” value=’<txp:section />’ /> <li class=”<txp:if_variable name=“list_item” value=“default”>home<txp:else /><txp:section /></txp:if_variable><txp:if_section name=’<txp:section />’> active</txp:if_section>”><a href=”<txp:section url=“1” />”><txp:section title=“1” /></a></li>
</txp:section_list>

Thank you Maniqui and Els

Last edited by RedFox (2012-10-12 22:18:58)

Offline

#16 2012-10-12 22:19:28

GugUser
Member
From: Quito (Ecuador)
Registered: 2007-12-16
Posts: 1,473

Re: How to customize <li> in <txp:section_list> ... !?

Other solution:

Give your default section the name “home”. Then this:

<ul>
<txp:if_status><li<txp:if_section name=","> class="active"><txp:section name="home" title="1" /><txp:else />><a href="/"><txp:section name="home" title="1" /></a></txp:if_section></li><txp:else /><li><a href="/"><txp:section name="home" title="1" /></a></li></txp:if_status>
<txp:section_list break="" sections="thework,aanbod,info">
<li <txp:if_section name='<txp:section />'>class="<txp:section /> active"><txp:section title="1" /><txp:else />class="<txp:section />"><a href="/<txp:section />"><txp:section title="1" /></a></txp:if_section></li>
</txp:section_list>
</ul>

Offline

#17 2012-10-12 22:53:44

els
Moderator
From: The Netherlands
Registered: 2004-06-06
Posts: 7,458

Re: How to customize <li> in <txp:section_list> ... !?

RedFox wrote:

Ahhhh … <txp:if_section name='<txp:section />'> … :)

Sorry about that! (I copied Julián’s if_variable tag, then changed only half of it…) I corrected my post above.

Last edited by els (2012-10-12 22:54:09)

Offline

Board footer

Powered by FluxBB