Template::Plugin::LinkTarget - TT filter to add "target" attribute to all HTML links
[% USE LinkTarget(target="_blank" exclude=['www.example.com']) %] ... [% FILTER linktarget %] <a href="http://www.google.com/">Google</a> [% END %] ... [% text | linktarget %]
Template::Plugin::LinkTarget is a filter plugin for TT, which adds a
target attribute to all HTML links found in the filtered text.
Through the use of the
exclude option, you can specify URLs that are not given a new
target attribute. This can be used to set up a filter that leaves internal links alone but that sets up external links to open in a new browser window.
exclude accepts a list of regular expressions, so you can be as elaborate as you'd like.
target option specifies what target you'd like to give to links, defaulting to "_blank".
Initializes the template plugin.
Filters the given text, and adds the "target" attribute to links.
Graham TerMarsch (firstname.lastname@example.org)
Copyright (C) 2008, Graham TerMarsch. All Rights Reserved.
This is free software; you can redistribute it and/or modify it under the same terms as Perl itself.