-
-
13 Jan 2022 20:02:58 UTC
- Distribution: App-Templer
- Source (raw)
- Browse (raw)
- Changes
- Homepage
- How to Contribute
- Repository
- Issues (0)
- Testers (0 / 1 / 0)
- Kwalitee
Bus factor: 1- % Coverage
- License: perl_5
- Perl: v5.8.0
- Activity
24 month- Tools
- Download (173.35KB)
- MetaCPAN Explorer
- Permissions
- Subscribe to distribution
- Permalinks
- This version
- Latest version
NAME
Templer::Plugin::RootPath - A plugin to add path to web-root to variables.
SYNOPSIS
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.
DESCRIPTION
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.LICENSE
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".
AUTHOR
Bruno BEAUFILS <bruno@boulgour.com>
COPYRIGHT AND LICENSE
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.
METHODS
Constructor. No arguments are required/supported.
expand_variables
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.
Module Install Instructions
To install App::Templer, copy and paste the appropriate command in to your terminal.
cpanm App::Templer
perl -MCPAN -e shell install App::Templer
For more information on module installation, please visit the detailed CPAN module installation guide.