Description | A static content generator. |
Newcomen::Plugin::Blog::Index::Lists::Defaults - Sets some defaults for list index pages.
This plugin will add default formatters for all content on list index pages, and set renderer and writer for these index pages (unless a renderer/writer is already set).
The default formatter(s) will always be added to all Newcomen::Content instances on a page with a
creator ID starting with 'Blog::Index::Lists'
, early during the hook_formatters() hook (see
HOOKS). However, formatters will not be added twice, if a formatter of the same name
already exists in the content's formatter list, it will not be added again.
The default renderer and writer will be set for all Newcomen::Page instances with a creator ID
starting with 'Blog::Index::Lists'
, unless a renderer or writer is already set for the page. This
will be done late during the hook_renderer()/hook_writer() hook, respectively. See
HOOKS.
{ 'blog' => { 'index' => { 'lists' => { 'defaults' => { 'ascending' => undef, 'exclude_children' => undef, 'hierarchical' => undef, 'per_page' => undef, 'page_info' => {}, 'formatters' => undef, 'renderer' => undef, 'writer' => undef, }, }, }, }, }
These are the default options set by this plugin. They may be overridden by user configuration.
The options blog/index/lists/defaults/formatters, blog/index/lists/defaults/renderer and blog/index/lists/defaults/writer work like described in Newcomen::Plugin::Blog::Defaults, please see there for details.
blog/index/lists/defaults/ascending specifies whether to sort the articles in ascending order, i.e. oldest articles first.
blog/index/lists/defaults/per_page is a default setting for the number of articles per index page.
blog/index/lists/defaults/exclude_children is the default setting for whether to exclude child lists on an index page (e.g. articles from subcategories on a category index page).
blog/index/lists/defaults/hierarchical specifies if lists are hierarchical by default.
blog/index/lists/defaults/page_info may contain defaults for additional information to be stored in the pages' meta data. This has to be a hashref (may be empty).
It is up to the individual index plugins to respect these last five options. They default to
undef
(or an empty hashref for the page_info option), meaning that plugins should use the
defaults from blog/index/defaults instead (if applicable), or hard-coded internal defaults.
This plugin implements the following hooks: hook_formatters() (priority 400
),
hook_renderer() (priority 600
) and hook_writer() (priority 600
).
Newcomen::Content, Newcomen::Page, Newcomen::Plugin::Blog::Defaults
This is version 2014052501
.
Stefan Goebel - newcomen {at} subtype {dot} de
Copyright 2013-2014 Stefan Goebel.
This file is part of Newcomen.
Newcomen is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the license, or (at your option) any later version.
Newcomen is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License along with Newcomen. If not, see <http://www.gnu.org/licenses/>.