-
-
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::Breadcrumbs - A plugin to create breadcrumbs
SYNOPSIS
The following is a good example use of this plugin
title: About my site crumbs: Home,Software ---- <p>This is my page content...</p>
Here the variable 'crumbs' will be converted into a loop variable called 'breadcrumbs'. THe links and titls will be set automatically, but if you need to override them you can do so via:
title: About my site crumbs: Home,Software[Soft],Testing[Test] ---- <p>This is my page content...</p>
That will result in links to /, /Soft, and /Soft/Test, respectively. With display names of "Home", "Software" and "Testing".
DESCRIPTION
This plugin expands the values of "crumbs", as written in a template, to a loop-variable with the name "breadcrumbs".
This can be used in a template like so:
<!-- tmpl_if name='breadcrumbs' --> <ul> <!-- tmpl_loop name='breadcrumbs' --> <li><a href="<!-- tmpl_var name='link' -->"><!-- tmpl_var name='title' --></a></li> <!-- /tmpl_loop --> </ul> <!-- /tmpl_if -->
This template is an example.
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
Steve Kemp <steve@steve.org.uk>
COPYRIGHT AND LICENSE
Copyright (C) 2015 Steve Kemp <steve@steve.org.uk>.
This library is free software. You can modify and or distribute it under the same terms as Perl itself.
METHODS
new
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.
This method will expand any variable that is called 'crumbs' into a HTML::Template loop, suitable for the display of breadcrumbs.
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.