Textpattern CMS support forum
You are not logged in. Register | Login | Help
- Topics: Active | Unanswered
#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
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
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
Offline
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
Re: [textile] target= _blank
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
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
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
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
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