Beefy Boxes and Bandwidth Generously Provided by pair Networks
Welcome to the Monastery
 
PerlMonks  

Re: Help with Template Workflow

by naikonta (Curate)
on Aug 29, 2007 at 13:52 UTC ( [id://635801]=note: print w/replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
    my %dispatch = (
            home            => \&home,
    ...
            faq             => \&faq,
            ....
    );
    
  2. or download this
    my %dispatch = (
            home            => sub { \&home(); },
    ...
            faq             => sub { \&faq(); },
            ....
    );
    
  3. or download this
    my $default_action = 'home';
    my $action = $cgi->param('a') || '';
    ...
    my $executor = $dispatch{$action} ||
                   $dispatch{$default_action};
    &$executor();
    
  4. or download this
    ... some html....
    <tmpl_include name="other-template.html">
    <tmpl_include name="other-static.html">
    
  5. or download this
    <!-- news.html -->
    ...some placeholders here...
    ...
    ...
    </html>
    <!-- end of main.html -->
    
  6. or download this
    # assuming load_template() is defined somewhere
    # to return a template object
    ...
    );
    
    print $template->output;
    

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://635801]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others taking refuge in the Monastery: (5)
As of 2024-03-28 22:10 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found