Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#1 2007-08-04 12:12:18

mttw
Member
From: The Netherlands
Registered: 2005-03-12
Posts: 26

[textile] target= _blank

is it possible to use “target= _blank” with textile?

Offline

#2 2007-08-04 12:34:08

the_ghost
Plugin Author
From: Minsk, The Republic of Belarus
Registered: 2007-07-26
Posts: 907
Website

Re: [textile] target= _blank

It seems that not :( I think there are plugins that have such functionality


Providing help in hacking ATM! Come to courses and don’t forget to bring us notebook and hammer! What for notebook? What a kind of hacker you are without notebok?

Offline

#3 2007-08-04 14:24:28

mttw
Member
From: The Netherlands
Registered: 2005-03-12
Posts: 26

Re: [textile] target= _blank

unfortunately I can’t find any plugin…. is there somebody who did?

Offline

#4 2007-08-04 19:14:36

the_ghost
Plugin Author
From: Minsk, The Republic of Belarus
Registered: 2007-07-26
Posts: 907
Website

Re: [textile] target= _blank

Try to look for wet_link


Providing help in hacking ATM! Come to courses and don’t forget to bring us notebook and hammer! What for notebook? What a kind of hacker you are without notebok?

Offline

#5 2007-08-04 20:36:29

jm
Plugin Author
From: Missoula, MT
Registered: 2005-11-27
Posts: 1,746
Website

Re: [textile] target= _blank

Or use zem_prblock.

Offline

#6 2007-08-19 17:30:27

ardilla
Member
From: California, USA
Registered: 2007-06-09
Posts: 11
Website

Re: [textile] target= _blank

Force-opening new windows for non-technical (by technical I mean stuff like the textile help popup) is not a good practice. Nevertheless, you can insert a class like “newwin” and then use JavaScript to insert new window functions. (The target attribute has been deprecated in strict XHTML versions; it should only be used for frames… and when was the last time any of us saw one?)

Offline

#7 2007-08-19 22:56:41

keith
Member
From: Blyth, Northumberland, England
Registered: 2004-12-08
Posts: 199
Website

Re: [textile] target= _blank

This works

I really wish it was in the Textile core, pleeeaassseee!!!

It’s the only solution I’ve found that would enable me to run smd_slimbox and have links that open externally, in the same article.

wet_link worked, but I really like the Textile link syntax; and zem_prblock would only allow one “REL” attribute in a page.

Last edited by keith (2007-08-19 23:01:35)


Keith
Blyth, Northumberland, England
Capture The Moment

Offline

#8 2007-09-12 23:44:46

mrtunes
Member
From: Toronto, On
Registered: 2007-03-12
Posts: 575
Website

Re: [textile] target= _blank

i tried using this technique but it didnt seem to work. maybe it will work on all future articles i write with textile? but i cant seem to get it to apply to one i just wrote today.

Offline

#9 2010-02-07 12:40:14

hans maulwurf
New Member
Registered: 2010-01-21
Posts: 4

Re: [textile] target= _blank

You can also use raw HTML, seems to be the easiest way to me:

“==<a href=http://panopticlick.eff.org target=”_blank”>EFF’s Panopticlick</a>==”

(remove the “” )

Edit: Does not work with “” around the url after href=

Last edited by hans maulwurf (2010-02-07 12:46:04)

Offline

#10 2010-02-08 10:32:45

trenc
Plugin Author
From: ⛵️, currently Göteborg, SE
Registered: 2008-02-27
Posts: 574
Website GitHub

Re: [textile] target= _blank

I really wish it was in the Textile core, pleeeaassseee!!!

Hope not! The target attribute is deprecated. It was introduced for navigating in frames and frameset and using in non-frameset sites are a misuse.

But if you want really force a new browser window I recommend a jQuery or other Javascript solution with target.

In the <head>:

<script type="text/javascript" src="<txp:site_url />textpattern/jquery.js"></script>
<script type="text/javascript">
/* <![CDATA[ */
	$(document).ready(function() {
		$('.external').attr('target', '_blank');
	});
/* ]]> */
</script>

The only thing you have to do is gving the link the class »external«

Textile:

"(external) link to example.com":http://example.com/

Last edited by trenc (2010-02-08 10:34:39)


Digital nomad, sailing the world on a sailboat: 32fthome.com

Offline

#11 2010-02-08 20:16:55

keith
Member
From: Blyth, Northumberland, England
Registered: 2004-12-08
Posts: 199
Website

Re: [textile] target= _blank

trenc wrote:


Hope not! The target attribute is deprecated.

Have another look at what I linked to, Tommy – it doesn’t use “Target”, it uses the “Rel” attribute.

That said, your solution looks very neat and straightforward – can we have that in the core instead?

;0)

Incidentally, I wrote the post above 2 1/2 years ago – I think it’s safe to assume that the solution I linked to ain’t going into the core..!

Last edited by keith (2010-02-08 20:26:18)


Keith
Blyth, Northumberland, England
Capture The Moment

Offline

#12 2010-02-09 10:00:58

trenc
Plugin Author
From: ⛵️, currently Göteborg, SE
Registered: 2008-02-27
Posts: 574
Website GitHub

Re: [textile] target= _blank

Oh…
I’ve totally overseen this, sorry Keith! :(

Using the rel attribute is a much better option, than creating a deprecated target attribute with javascript.


Digital nomad, sailing the world on a sailboat: 32fthome.com

Offline

Board footer

Powered by FluxBB