Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#1 2007-01-21 23:56:02

ande
Member
Registered: 2007-01-21
Posts: 25

Different link (a href) styles for internal and external links

Hi there,

when adding an internal link, everything works fine as it is now.

But when a user adds a link to an external homepage, e.g. beginning with http:// instead of just / or such, the following should be possible automagically (with a speacial form?):

- Include a link image before the link in order to make clear this will be a jump to another site.
- Include target=”_blank” in link.

I know, target=_“blank” is deprecated in XHTML or so but many of us need the functioning and it can be provided otherwise. target=”_blank” leaves “our” window open, so the visitor could automatically turn back to us when she read enough on the other site… it annoying if he has to get back manually..

Offline

#2 2007-01-22 20:27:29

Mary
Sock Enthusiast
Registered: 2004-06-27
Posts: 6,236

Re: Different link (a href) styles for internal and external links

A plugin could do this.

Offline

#3 2007-01-22 21:05:32

ande
Member
Registered: 2007-01-21
Posts: 25

Re: Different link (a href) styles for internal and external links

Yes, thanks – I found a plugin who does this change for alle links inside the link, zem_prblock.

But – this is very hard to apply if you have the two kinds of links mixed on one page… my default case – thats why I’m asking.

The positive side of this featre is that there would be no need to change the syntax in Textile. A very fast logic could determine if the links begin with “http://” oder “something://” and then maybe apply another form (or a form at all!) as if it began without it. Now, I think, hyperlinks are not generated via a form.

Offline

#4 2007-01-22 23:33:53

Mary
Sock Enthusiast
Registered: 2004-06-27
Posts: 6,236

Re: Different link (a href) styles for internal and external links

What you want, then, is JavaScript.

Offline

Board footer

Powered by FluxBB