Zoffix Znet > App-ZofCMS > App::ZofCMS::Plugin::QueryToTemplate

Download:
App-ZofCMS-1.001004.tar.gz

Dependencies

Annotate this POD

Website

View/Report Bugs
Module Version: 1.001004   Source  

NAME ^

App::ZofCMS::Plugin::QueryToTemplate - ZofCMS plugin to automagically make query parameters available in the template

SYNOPSIS ^

In your ZofCMS template, or in your main config file (under template_defaults or dir_defaults):

    plugins => [ qw/QueryToTemplate/ ];

In any of your HTML::Template templates:

    <tmpl_var name="query_SOME_QUERY_PARAMETER_NAME">

DESCRIPTION ^

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:

    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 is: <tmpl_var name="query_foo">
    Baz is: <tmpl_var name="query_baz">

REPOSITORY ^

Fork this module on GitHub: https://github.com/zoffixznet/App-ZofCMS

BUGS ^

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

AUTHOR ^

Zoffix Znet <zoffix at cpan.org> (http://zoffix.com/, http://haslayout.net/)

LICENSE ^

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.

syntax highlighting: