Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#1 2010-02-01 13:31:14

Wolfgang
Member
From: Germany
Registered: 2006-07-18
Posts: 71
Website

Is there any possibility to define a link-class in <txp:link />

Hello

I’m looking for something like

<txp:link class=“myClass”/>

Here, only rel can be defined: <txp:link />

Thanks for any help

Best Regards
Wolfgang

Offline

#2 2010-02-01 13:48:23

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

Re: Is there any possibility to define a link-class in <txp:link />

Wolfgang wrote:

<txp:link class=“myClass”/>

This should get you close:

<txp:linklist>
<a href="<txp:link_url />" class="myClass"><txp:link_name /></a>
</txp:linklist>

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

#3 2010-02-02 17:53:17

trailgirl
Member
Registered: 2004-06-04
Posts: 68
Website

Re: Is there any possibility to define a link-class in <txp:link />

You can add the class in your form. Default link list form is “plainlinks”.

<div class="myclass"><txp:link /></div>

Offline

#4 2010-02-02 18:19:45

Wolfgang
Member
From: Germany
Registered: 2006-07-18
Posts: 71
Website

Re: Is there any possibility to define a link-class in <txp:link />

Thank you very much, but I’ve allready implemented the first solution and it already works.

Offline

#5 2010-02-04 11:27:47

Gallex
Member
Registered: 2006-10-08
Posts: 1,315

Re: Is there any possibility to define a link-class in <txp:link />

but how to add attribute rel to links within articles?

Offline

#6 2010-02-04 12:21:26

uli
Moderator
From: Cologne
Registered: 2006-08-15
Posts: 4,315

Re: Is there any possibility to define a link-class in <txp:link />

Try something with rah_replace.


In bad weather I never leave home without wet_plugout, smd_where_used and adi_form_links

Offline

Board footer

Powered by FluxBB