Skip site navigation (1)Skip section navigation (2)

FreeBSD Manual Pages

  
 
  

home | help
Template::Plugin::ClicUsereContributed Perl DocuTemplate::Plugin::Clickable(3)

NAME
       Template::Plugin::Clickable - Make URLs clickable in HTML

SYNOPSIS
	 [% USE	Clickable %]
	 [% FILTER clickable %]
	 URL is	http://www.tt2.org/
	 [% END	%]

       this will become:

	 URL is	<a href="http://www.tt2.org/">http://www.tt2.org/</a>

DESCRIPTION
       Template::Plugin::Clickable is a	plugin for TT, which allows you	to
       filter HTMLs clickable.

OPTIONS
       target
	     [%	FILTER clickable target	=> '_blank' %]
	     [%	message.body | html %]
	     [%	END %]

	   "target" option enables you to set target attribute in A links.
	   none	by default.

       finder_class
	   "finder_class" option enables you to	set other URI finder class
	   rather than URI::Find (default). For	example,

	     [%	FILTER clickable finder_class => 'URI::Find::Schemeless' %]
	     Visit www.example.com/join	right now!
	     [%	END %]

	   this	will become:

	     Visit <a href="http://www.example.com/join">www.example.com/join</a> right	now!

NOTE
       If you use this module with "html" filter, you should be	careful	not to
       break tags or brackets around the URLs. For example if you have a
       following URL form,

	 <http://www.example.com/>

       Clickable plugin	will filter this into:

	 <a href="http://www.example.com/"><http://www.example.com/></a>

       which is	bad for	HTML viewing. However, if you HTML filter them first
       and then	clickable filter, you'll get:

	 &lt;<a	href="http://www.example.com/&gt">http://www.example.com/&gt</a>;

       which href part is wrong.

       You'd better try	Template::Plugin::TagRescue in this case.

	 [% USE	Clickable -%]
	 [% USE	TagRescue -%]
	 [% FILTER html_except_for('a')	-%]
	 [% FILTER clickable -%]
	 <http://www.example.com/>
	 [%- END %]
	 [%- END %]

       will give you the right format.

AUTHOR
       Tatsuhiko Miyagawa <miyagawa@bulknews.net>

       This library is free software; you can redistribute it and/or modify it
       under the same terms as Perl itself.

SEE ALSO
       Template, URI::Find, Template::Plugin::TagRescue

perl v5.32.1			  2006-02-20	Template::Plugin::Clickable(3)

NAME | SYNOPSIS | DESCRIPTION | OPTIONS | NOTE | AUTHOR | SEE ALSO

Want to link to this manual page? Use this URL:
<https://www.freebsd.org/cgi/man.cgi?query=Template::Plugin::Clickable&sektion=3&manpath=FreeBSD+13.0-RELEASE+and+Ports>

home | help