13 Jan 2022 20:02:58 UTC
- Distribution: App-Templer
- Source (raw)
- Browse (raw)
- How to Contribute
- Issues (0)
- Testers (0 / 1 / 0)
- KwaliteeBus factor: 1
- % Coverage
- License: perl_5
- Perl: v5.8.0
- Activity24 month
- Download (173.35KB)
- MetaCPAN Explorer
- Subscribe to distribution
- This version
- Latest versionSKX Steve Kemp
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_tomay be used to compute the relative path to the web-root.
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 <email@example.com>
Copyright (C) 2015 Bruno BEAUFILS <firstname.lastname@example.org>.
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.
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.