App-ZofCMS-Plugin-Tagged
App::ZofCMS::Plugin::Tagged - ZofCMS plugin to fill templates with data from
query, template variables and configuration using <TAGS>
=head1 SYNOPSIS
Your ZofCMS template:
{
cookie_foo => '<TAG:TNo cookies:{d}{cookies}{foo}>',
query_foo => '[<TAG:Q:{foo}>]',
set_cookies => [ ['foo', 'bar' ]],
plugins => [ { Cookies => 10 }, { Tagged => 20 } ],
conf => {
base => 'test.tmpl',
},
}
In your 'test.tmpl' base L<HTML::Template> template:
Cookie 'foo' is set to: <tmpl_var name="cookie_foo"><br>
Query 'foo' is set to: <tmpl_var name="query_foo">
In ZofCMS template the Cookies plugin is set to run before Tagged plugin,
thus on first page access cookies will not be set, and we will access
the page without setting the 'foo' query parameter. What do we see:
Cookie 'foo' is set to: No cookies
Query 'foo' is set to: []
No, if we run the page the second time it (now cookies are set with
L<App::ZofCMS::Plugin::Cookies> plugin) will look like this:
Cookie 'foo' is set to: bar
Query 'foo' is set to: []
If we pass query parameter 'foo' to the page, setting it to 'beer'
our page will look like this:
Cookie 'foo' is set to: bar
Query 'foo' is set to: [beer]
That's the power of Tagged plugin... now I'll explain what those weird
looking tags mean.
=head1 DESCRIPTION
The module provides means to the user to use special "tags" in B<scalar>
values inside ZofCMS template. This provides the ability to display
data generated by templates (i.e. stored in C<{d}> first level key), access
query or configuration hashref. Possibilities are endless.
B<This documentation assumes you have read documentation for>
L<App::ZofCMS> B<including> L<App::ZofCMS::Config> B<and>
L<App::ZofCMS::Template>
INSTALLATION
To install this module, run the following commands:
perl Build.PL
./Build
./Build test
./Build install
SUPPORT AND DOCUMENTATION
After installing, you can find documentation for this module with the
perldoc command.
perldoc App::ZofCMS::Plugin::Tagged
You can also look for information at:
RT, CPAN's request tracker
http://rt.cpan.org/NoAuth/Bugs.html?Dist=App-ZofCMS-Plugin-Tagged
AnnoCPAN, Annotated CPAN documentation
http://annocpan.org/dist/App-ZofCMS-Plugin-Tagged
CPAN Ratings
http://cpanratings.perl.org/d/App-ZofCMS-Plugin-Tagged
Search CPAN
http://search.cpan.org/dist/App-ZofCMS-Plugin-Tagged
COPYRIGHT AND LICENCE
Copyright (C) 2008 Zoffix Znet
This program is free software; you can redistribute it and/or modify it
under the same terms as Perl itself.