Statocles::Theme - Templates, headers, footers, and navigation
version 0.012
# Template directory layout /theme/site/layout.html.ep /theme/blog/index.html.ep /theme/blog/post.html.ep my $theme = Statocles::Theme->new( path => '/theme' ); my $layout = $theme->template( site => 'layout.html' ); my $blog_index = $theme->template( blog => 'index.html' ); my $blog_post = $theme->template( blog => 'post.html' );
A Theme contains all the templates that applications need. This class handles finding and parsing files into template objects.
When the "source_dir" is read, the templates inside are organized based on their name and their parent directory.
The source directory for this theme.
If the source_dir begins with ::, will pull one of the Statocles default themes from the Statocles share directory.
The template objects for this theme.
Handle the source_dir :: share theme.
Read the source_dir and create the template objects inside.
source_dir
Get the template from the given section with the given name.
section
name
Doug Bell <preaction@cpan.org>
This software is copyright (c) 2014 by Doug Bell.
This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.
To install Statocles, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Statocles
CPAN shell
perl -MCPAN -e shell install Statocles
For more information on module installation, please visit the detailed CPAN module installation guide.