Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#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

#2 2009-03-02 15:12:16

colak
Admin
From: Cyprus
Registered: 2004-11-20
Posts: 9,091
Website GitHub Mastodon Twitter

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

#3 2009-03-02 16:00:26

maniqui
Member
From: Buenos Aires, Argentina
Registered: 2004-10-10
Posts: 3,070
Website

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.


La música ideas portará y siempre continuará

TXP Builders – finely-crafted code, design and txp

Offline

#4 2009-03-02 16:07:30

Bloke
Developer
From: Leeds, UK
Registered: 2006-01-29
Posts: 11,453
Website GitHub

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

#5 2009-03-02 16:33:52

maniqui
Member
From: Buenos Aires, Argentina
Registered: 2004-10-10
Posts: 3,070
Website

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>

La música ideas portará y siempre continuará

TXP Builders – finely-crafted code, design and txp

Offline

#6 2009-03-02 16:38:55

Bloke
Developer
From: Leeds, UK
Registered: 2006-01-29
Posts: 11,453
Website GitHub

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

#8 2009-03-02 17:17:36

colak
Admin
From: Cyprus
Registered: 2004-11-20
Posts: 9,091
Website GitHub Mastodon Twitter

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

Board footer

Powered by FluxBB