hirafoo/Template-Plugin-LinkTo
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Folders and files
Name | Name | Last commit message | Last commit date | |
---|---|---|---|---|
Repository files navigation
SYNOPSIS Input: [% USE LinkTo -%] [% args = { href => '/link/to', } -%] [% LinkTo.link_to('link_text', args) %] Output: <a href="/link/to">link_text</a> Input: [% USE LinkTo -%] [% args = { href => '/link/to', hoge => 'huga', foo => 'bar', } -%] [% LinkTo.link_to('link_text', args) %] Output: <a href="/link/to?foo=bar&hoge=huga">link_text</a> Input: [% USE LinkTo -%] [% args = { href => '/link/to', hoge => 'huga', target => '_blank', } -%] [% LinkTo.link_to('link_text', args) %] Output: <a href="/link/to?hoge=huga" target="_blank">link_text</a> Input: [% USE LinkTo -%] [% args = { href => '/link/to', hoge => 'huga', target => '_blank', confirm => 'really ?', } -%] [% LinkTo.link_to('link_<br />a&b<br />"text"', args) %] Output: <a href="/link/to?hoge=huga" target="_blank" onclick="return confirm('really ?');">link_<br />a&b<br />"text"</a> Input: [% USE LinkTo -%] [% args = { } -%] [% LinkTo.link_to('link_text', args) %] Output: link_text Sample with DBIx::Class::ResultSet [% USE LinkTo -%] [%- WHILE (u = users.next) -%] [% args = { href => "user/${u.id}", hoge => 'huga', foo => 'bar', } -%] [% LinkTo.link_to(u.nickname, args) %] [%- END %] DESCRIPTION Template::Plugin::LinkTo is like link_to in Ruby on Rails, but NOT same at all. SEE ALSO Template, Template::Plugin AUTHOR Tomoya Hirano, <hirafoo@cpan.org> COPYRIGHT AND LICENSE This library is free software; you can redistribute it and/or modify
About
No description, website, or topics provided.
Resources
Stars
Watchers
Forks
Releases
No releases published
Packages 0
No packages published