GSP
Quick Navigator

Search Site

Unix VPS
A - Starter
B - Basic
C - Preferred
D - Commercial
MPS - Dedicated
Previous VPSs
* Sign Up! *

Support
Contact Us
Online Help
Handbooks
Domain Status
Man Pages

FAQ
Virtual Servers
Pricing
Billing
Technical

Network
Facilities
Connectivity
Topology Map

Miscellaneous
Server Agreement
Year 2038
Credits
 

USA Flag

 

 

Man Pages
Gantry::Template::TT(3) User Contributed Perl Documentation Gantry::Template::TT(3)

Gantry::Template::TT - Template Toolkit plugin for Gantry.

  use Gantry::Template::TT;

Use this module when you want template toolkit to produce your output:

    use Gantry qw/ -Engine=YourChoice -TemplateEngine=TT /;

Then in your do_* method do something like this:

    sub do_something {
        my $self = shift;

        # ... gather data for output

        # set the name of the template TT should use:
        $self->stash->view->template( 'output.tt' );

        # set the data TT should use to fill in the template:
        $self->stash->view->data(
            {
                # vars to pass to TT's process method
            }
        );
    }

This is plugin module that contains the Template Toolkit method calls.

$site->do_action
"do_action" is a required function for the template plugin. It purpose is to call or dispatch to the appropriate method. This function is passed three parameters:

my( $self, $action, @path_array ) = @_;

This method is responsible for calling the controller method and storing the output from the controller.

$site->do_error
This method gives you the flexibility of logging, re-estabilishing a database connection, rebuilding the template object, etc.
$site->do_process
This method is the final step in the template plugin. Here you need call the template object passing the controller data and return the output.
$site->template_engine
Always returns the name of this module, which is the name of the current template engine.

Gantry(3)

Tim Keefer <tkeefer@gmail.com>

Copyright (c) 2005-6, Tim Keefer.

This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself, either Perl version 5.8.6 or, at your option, any later version of Perl 5 you may have available.

2022-04-07 perl v5.32.1

Search for    or go to Top of page |  Section 3 |  Main Index

Powered by GSP Visit the GSP FreeBSD Man Page Interface.
Output converted with ManDoc.