App::ZofCMS::Plugin::QueryToTemplate - ZofCMS plugin to automagically make query parameters available in the template
In your ZofCMS template, or in your main config file (under template_defaults or dir_defaults):
template_defaults
dir_defaults
plugins => [ qw/QueryToTemplate/ ];
In any of your HTML::Template templates:
<tmpl_var name="query_SOME_QUERY_PARAMETER_NAME">
Plugin can be run at any priority level and it does not take any input from ZofCMS template.
Upon plugin's execution it will stuff the {t} first level key (see App::ZofCMS::Template if you don't know what that key is) with all the query parameters as keys and values being the parameter values. Each query parameter key will be prefixed with query_. In other words, if your query looks like this:
{t}
query_
http://foo.com/index.pl?foo=bar&baz=beerz
In your template parameter foo would be accessible as query_foo and parameter baz would be accessible via query_baz
foo
query_foo
baz
query_baz
Foo is: <tmpl_var name="query_foo"> Baz is: <tmpl_var name="query_baz">
Fork this module on GitHub: https://github.com/zoffixznet/App-ZofCMS
To report bugs or request features, please use https://github.com/zoffixznet/App-ZofCMS/issues
If you can't access GitHub, you can email your request to bug-App-ZofCMS at rt.cpan.org
bug-App-ZofCMS at rt.cpan.org
Zoffix Znet <zoffix at cpan.org> (http://zoffix.com/, http://haslayout.net/)
You can use and distribute this module under the same terms as Perl itself. See the LICENSE file included in this distribution for complete details.
LICENSE
To install App::ZofCMS, copy and paste the appropriate command in to your terminal.
cpanm
cpanm App::ZofCMS
CPAN shell
perl -MCPAN -e shell install App::ZofCMS
For more information on module installation, please visit the detailed CPAN module installation guide.