Statocles::Role::PageAttrs - A role implementing common attributes for pages/documents
The title of the page. Any unsafe characters in the title (
&) will be escaped by the template, so no HTML allowed.
The author of the page.
A hash of arrays of links to pages related to this page. Possible keys:
feed - Feed pages related to this page alternate - Alternate versions of this page posted to other sites stylesheet - Additional stylesheets for this page script - Additional scripts for this page
Each item in the array is a link object. The most common attributes are:
text - The text of the link href - The page for the link type - The MIME type of the link, optional
A hash of images related to this page. Each value should be an image object. These are used by themes to show images next to articles, thumbnails, and/or shortcut icons.
my @links = $page->links( $key ); my $link = $page->links( $key ); $page->links( $key => $add_link );
Get or append to the links set for the given key. See the links attribute for some commonly-used keys.
If only one argument is given, returns a list of link objects. In scalar context, returns the first link in the list.
If two or more arguments are given, append the new links to the given key.
$add_link may be a URL string, a hash reference of link attributes, or a Statocles::Link object. When adding links, nothing is returned.
my $image = $page->images( $key );
Doug Bell <firstname.lastname@example.org>
This software is copyright (c) 2016 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.