Skip to content

Commit

Permalink
Call component load hook for Zoom components.
Browse files Browse the repository at this point in the history
  • Loading branch information
racke committed Dec 7, 2010
1 parent 8b085fd commit 3b85427
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion lib/WellWell/Compose/Component/Zoom.pm
Expand Up @@ -43,7 +43,7 @@ sub new {
sub process {
my ($self, $attributes) = @_;
my ($content, $xml_spec, $spec, $iter_name, $html_object, $zoom);
my (%filters);
my (%filters, $subname, $subref);

# parse specification
$xml_spec = new Template::Zoom::Specification::XML;
Expand All @@ -68,6 +68,14 @@ sub process {
$zoom = new Template::Zoom (template => $html_object, filters => \%filters,
database => $self->{database});

# call component load subroutine
$subname = "component_$self->{name}_load";
$subref = $Vend::Cfg->{Sub}{$subname} || $Global::GlobalSub->{$subname};

if ($subref) {
$subref->($self->{name}, $spec, $html_object, $zoom);
}

return $zoom->process($attributes);
}

Expand Down

0 comments on commit 3b85427

Please sign in to comment.