| Rudesind documentation | view source | Contained in the Rudesind distribution. |
Rudesind::Gallery - A gallery which may contain both images and other galleries
use Rudesind::Gallery;
my $gallery = Rudesind::Gallery->new( path => '/', config => $config );
foreach my $img ( $gallery->images ) { ... }
This class represents a gallery. A gallery can contain both images as well as other galleries.
The new() method requires two parameters:
The URI path for the gallery. The top-level gallery will always have be /.
A Rudesind::Config object.
If no filesystem directory matches the given path, then the constructor returns false.
This class provides the following methods:
The URI path for this gallery.
The same value as path(). Provided for the use of the Mason UI.
Use path() instead.
A title for the gallery. Currently, this is just the last portion of the path, or "top" if the path is /.
The Rudesind::Config object given to the constructor.
Returns a list of Rudesind::Gallery objects, each of which is a
gallery contained by the object this method is called on.
The list is sorted by title (the last portion of the gallery's path).
Returns a list of Rudesind::Image objects, each of which is an
image contained by the object this method is called on.
The list is sorted by title (the image file's name).
Given a filename (without a path), this method returns a new
Rudesind::Image object for that image. Tihs is the constructor for
image objects.
If no such file exists in the gallery, then this method returns a false value.
Given an image object, these methods return the previous or next image object in the gallery, if one exists.
This class uses the Rudesind::Captioned role.
| Rudesind documentation | view source | Contained in the Rudesind distribution. |