github
Advanced Search
  • Home
  • Pricing and Signup
  • Explore GitHub
  • Blog
  • Login

hirafoo / Template-Plugin-LinkTo

  • Admin
  • Watch Unwatch
  • Fork
  • Your Fork
  • Pull Request
  • Download Source
    • 1
    • 0
  • Source
  • Commits
  • Network (0)
  • Issues (0)
  • Downloads (0)
  • Wiki (1)
  • Graphs
  • Branch: master

click here to add a description

click here to add a homepage

  • Branches (1)
    • master ✓
  • Tags (0)
Sending Request…
Enable Donations

Pledgie Donations

Once activated, we'll place the following badge in your repository's detail box:
Pledgie_example
This service is courtesy of Pledgie.
  cancel

  cancel
  • Private
  • Read-Only
  • HTTP Read-Only

This URL has Read+Write access

coped rel tag 
hirafoo (author)
Wed Oct 07 06:42:21 -0700 2009
commit  08e9c4f8f91058fdc3ecb62cc81964c9eedbc479
tree    42b7572ad404490959e2a71bc566f2b39dc27eb4
parent  f1ec36b40de8b675d56c78a8635d876a315a8cfc
Template-Plugin-LinkTo /
name age
history
message
file Changes Wed Oct 07 06:42:21 -0700 2009 coped rel tag [hirafoo]
file MANIFEST Fri May 08 10:54:29 -0700 2009 add Module::Install [hirafoo]
file META.yml Wed Oct 07 06:42:21 -0700 2009 coped rel tag [hirafoo]
file Makefile.PL Mon May 11 06:02:04 -0700 2009 fix html option sort [hirafoo]
file README Fri May 08 10:54:29 -0700 2009 add Module::Install [hirafoo]
directory inc/ Loading commit data...
directory lib/ Wed Oct 07 06:42:21 -0700 2009 coped rel tag [hirafoo]
directory t/ Wed Oct 07 06:42:21 -0700 2009 coped rel tag [hirafoo]
README
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_&lt;br /&gt;a&amp;b&lt;br 
      /&gt;&quot;text&quot;</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

Blog | Support | Training | Contact | API | Status | Twitter | Help | Security
© 2010 GitHub Inc. All rights reserved. | Terms of Service | Privacy Policy
Powered by the Dedicated Servers and
Cloud Computing of Rackspace Hosting®
Dedicated Server