NAME

OpenGuides::Template - Do Template Toolkit related stuff for OpenGuides applications.

DESCRIPTION

Does all the Template Toolkit stuff for OpenGuides. Distributed and installed as part of the OpenGuides project, not intended for independent installation. This documentation is probably only useful to OpenGuides developers.

SYNOPSIS

use Config::Tiny;
use OpenGuides::Utils;
use OpenGuides::Template;

my $config = Config::Tiny->read('wiki.conf');
my $wiki = OpenGuides::Utils->make_wiki_object( config => $config );

print OpenGuides::Template->output( wiki     => $wiki,
                                    config   => $config,
                                    template => "node.tt",
                                    vars     => { foo => "bar" }
);

METHODS

output
print OpenGuides::Template->output( wiki         => $wiki,
                                    config       => $config,
                                    template     => "node.tt",
                                    content_type => "text/html",
                                    vars         => { foo => "bar" }
);

Returns everything you need to send to STDOUT, including the Content-Type: header. Croaks unless template is supplied.

Content-Type: defaults to text/html and is omitted if the content_type arg is explicitly set to the blank string.

AUTHOR

The OpenGuides Project (grubstreet@hummous.earth.li)

COPYRIGHT

Copyright (C) 2003 The OpenGuides Project.  All Rights Reserved.

This module is free software; you can redistribute it and/or modify it under the same terms as Perl itself.