1 package Maypole::Components;
10 my $self = bless { config => $r->config, parent => $r }, $class;
16 my $url = URI->new($path);
17 $self->{path} = $url->path;
19 $self->{query} = $url->query_form_hash;
21 return $self->{output};
24 sub get_template_root { shift->{parent}->get_template_root }
25 sub view_object { shift->{parent}->view_object }
32 Maypole::Components - Run Maypole sub-requests as components
41 [% request.component("/beer/view_as_component/20") %]
45 This subclass of Maypole allows you to integrate the results of a Maypole
46 request into an existing request. You'll need to set up actions and templates
47 which return fragments of HTML rather than entire pages, but once you've
48 done that, you can use the C<component> method of the Maypole request object
49 to call those actions. You may pass a query string in the usual URL style.
50 You should not fully qualify the Maypole URLs.
54 http://maypole.perl.org/
58 Simon Cozens, E<lt>simon@cpan.orgE<gt>
60 =head1 COPYRIGHT AND LICENSE
62 Copyright 2004 by Simon Cozens