NAME
Dotiac::DTL::Addon::importloop: Import loop variables into the top level namespace
SYNOPSIS
Load from a Dotiac::DTL-template:
{% load importloope %}
Load in Perl file for all templates:
use Dotiac::DTL::Addon::importloop;
Then it can be used in the template:
posts=>[
{Title=>"test",Content="A test post",Date=>time},
{Title=>"My first post",Content="Nothing to say here",Date=>time-3600}
]
{% importloop posts %}
<h1>{{ Title }}</h1> {# Title is now in the main namespace #}
{{ Content|linebreaks }}
<em>{{ Date|date:jS F Y H:i" }}</em>
{% empty %}
No entries
{% endimportloop %}
INSTALLATION
via CPAN:
perl -MCPAN -e "install Dotiac::DTL::Addon::importloop"
or get it from https://sourceforge.net/project/showfiles.php?group_id=249411&package_id=306751, extract it and then run in the extracted folder:
perl Makefile.PL
make test
make install
DESCRIPTION
Adds the {% importloop %} tag
Tags
Dotiac::DTL::Tag::importloop: The importloop Tag.
BUGS
This will make Dotiac slower.
Please report any bugs or feature requests to https://sourceforge.net/tracker2/?group_id=249411&atid=1126445
SEE ALSO
Dotiac::DTL, Dotiac::DTL::Addon, http://www.dotiac.com, http://www.djangoproject.com
AUTHOR
Marc-Sebastian Lucksch
perl@marc-s.de