Textpattern CMS support forum
You are not logged in. Register | Login | Help
- Topics: Active | Unanswered
#1 2009-03-02 14:26:31
- pager
- New Member
- Registered: 2009-03-02
- Posts: 2
SPAN-Tag inside of a Section-A-Tag? (section, section_list)
Code:
<txp:section_list break="li" class="navi" include_default="1" sections="one,two" wraptag="ul" />
generates this XHTML-Code:
<ul>
<li>
<a href=”/one/”>One</a>
</li>
<li>
<a href=”/two/”>Two</a>
</li>
</ul>
but i *need folowing XHTML*-Structure:
<ul>
<li>
<a href=”/one/”>One <span>One Addon</span> </a>
</li>
<li>
<a href=”/two/”>Two <span>Two Addon</span> </a>
</li>
</ul>
Can anybody help me?
Thank You! :)
Offline
Re: SPAN-Tag inside of a Section-A-Tag? (section, section_list)
I had the same problem so I evenually resorted to hard coding it.
Yiannis
——————————
NeMe | hblack.art | EMAP | A Sea change | Toolkit of Care
I do my best editing after I click on the submit button.
Offline
Re: SPAN-Tag inside of a Section-A-Tag? (section, section_list)
Section list can work as a container tag since 4.0.7, so you can customize the output without relying on wraptag and break attributes.
Offline
Re: SPAN-Tag inside of a Section-A-Tag? (section, section_list)
This works for me:
<txp:section_list wraptag="ul" break="li">
<span><txp:section title="1" link="1" /></span>
</txp:section_list>
EDIT: maniqui was waaaaay faster :-)
Last edited by Bloke (2009-03-02 16:09:15)
The smd plugin menagerie — for when you need one more gribble of power from Textpattern. Bleeding-edge code available on GitHub.
Txp Builders – finely-crafted code, design and Txp
Offline
Re: SPAN-Tag inside of a Section-A-Tag? (section, section_list)
@Bloke, I was faster, but I didn’t write any code.
Now, I think the code you shared will not work for pager: it won’t output exactly what he asked for.
@pager, try this:
<txp:section_list wraptag="ul" break="li">
<a href="/<txp:section />/"><txp:section title="1" /><span><txp:section title="1" /> addon</span></a>
</txp:section_list>
or this:
<txp:section_list wraptag="ul" break="">
<li><a href="/<txp:section />/"><txp:section title="1" /><span><txp:section title="1" /> addon</span></a></li>
</txp:section_list>
Offline
Re: SPAN-Tag inside of a Section-A-Tag? (section, section_list)
Aye, that’ll do it. Nice one.
The smd plugin menagerie — for when you need one more gribble of power from Textpattern. Bleeding-edge code available on GitHub.
Txp Builders – finely-crafted code, design and Txp
Offline
#7 2009-03-02 16:51:07
- pager
- New Member
- Registered: 2009-03-02
- Posts: 2
Re: SPAN-Tag inside of a Section-A-Tag? (section, section_list)
maniqui schrieb:
@pager, try this:
…
Yessss!!! it works! :)
I thank all of you and particularly maniqui!
Offline
Re: SPAN-Tag inside of a Section-A-Tag? (section, section_list)
Way to go, Julián & Stef I have to take a closer look at those new container tags:)
Yiannis
——————————
NeMe | hblack.art | EMAP | A Sea change | Toolkit of Care
I do my best editing after I click on the submit button.
Offline