Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#1 2008-04-15 18:11:16

beechy
Member
Registered: 2006-03-02
Posts: 92

Put <span> inside <txp:link/> tag

I am trying to create the following html output from textpattern using the <txp:link /> tag

<ul>
<li><a href=”/home”><span>Home</span></a></li>
<li><a href=”/link1”><span>link1</span></a></li>
<li><a href=”/link2”><span>link2</span></a></li>
</ul>

at the moment the closest I can get is

<ul>
<li><span><a href=”/home”>Home</a></span></li>
<li><span><a href=”/link1”>link1</a></span></li>
<li><span><a href=”/link2”>link2</a></span></li>
</ul>

As I can only wrap a <span> tag around the <txp:link /> tag. I need to place the <span> tag inside the <txp:link /> tag as I have applied some css to achieve a rounded box on the a:hover event of my main menu.

I have tried to put <span>Home</span> <span>Link1</span> etc directly into the Links Title box in the admin area but this does not work either.

Is there any other way of doing this?

Last edited by beechy (2008-04-15 18:12:29)

Offline

#2 2008-04-15 18:38:49

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

Re: Put <span> inside <txp:link/> tag

<a href="<txp:link_url />"><span><txp:link_name /></span></a>

Offline

#3 2008-04-16 08:40:41

beechy
Member
Registered: 2006-03-02
Posts: 92

Re: Put <span> inside <txp:link/> tag

Thanks Els works a treat

Offline

Board footer

Powered by FluxBB