Templer::Plugin::RootPath - A plugin to add path to web-root to variables.
The following is a good example use of this plugin
title: About my site css: path_to(css) ---- <p>CSS files are stored in <!-- tmpl_var name='css' -->.
This is mainly useful as global variables used in the default layout.
This plugin allows template variables (considered as absolute path from the web-root) to be set to a correct relative path from any page of the website.
An empty call to path_to may be used to compute the relative path to the web-root.
path_to
This module is free software; you can redistribute it and/or modify it under the terms of either:
a) the GNU General Public License as published by the Free Software Foundation; either version 2, or (at your option) any later version, or
b) the Perl "Artistic License".
Bruno BEAUFILS <bruno@boulgour.com>
Copyright (C) 2015 Bruno BEAUFILS <bruno@boulgour.com>.
This library is free software. You can modify and or distribute it under the same terms as Perl itself.
Constructor. No arguments are required/supported.
This is the method which is called by the Templer::Plugin::Factory to expand the variables contained in a Templer::Site::Page object.
Variables are written in the file in the form "key: value", and are internally stored within the Page object as a hash.
This method iterates over each key & value and updates any that seem to refer to file-paths.
To install App::Templer, copy and paste the appropriate command in to your terminal.
cpanm
cpanm App::Templer
CPAN shell
perl -MCPAN -e shell install App::Templer
For more information on module installation, please visit the detailed CPAN module installation guide.