Mobile template is not being inherited (#12246)
added extra_www_add_properties method to Asset.pm and subclassed it in as Layout.pm as properties fix-up hook in child for www_add
This commit is contained in:
parent
d65fd7e646
commit
2628263384
4 changed files with 62 additions and 1 deletions
|
|
@ -514,5 +514,24 @@ sub www_view {
|
|||
return $self->SUPER::www_view;
|
||||
}
|
||||
|
||||
#-------------------------------------------------------------------
|
||||
|
||||
=head2 extra_www_add_properties ()
|
||||
|
||||
Inherit C<mobileStyleTemplateId> and C<mobileTemplateId> from the parent asset if it is an instance of
|
||||
L<WebGUI::Asset::Wobject::Layout>.
|
||||
|
||||
=cut
|
||||
|
||||
sub extra_www_add_properties {
|
||||
my $self = shift;
|
||||
my $session = shift;
|
||||
my $parentAsset = shift;
|
||||
my $properties = shift;
|
||||
return unless $parentAsset->isa('WebGUI::Asset::Wobject::Layout');
|
||||
$properties->{ mobileStyleTemplateId } = $parentAsset->get("mobileStyleTemplateId");
|
||||
$properties->{ mobileTemplateId } = $parentAsset->get("mobileTemplateId");
|
||||
}
|
||||
|
||||
1;
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue