use strict;
use parent qw(SL::Layout::Base);
-sub new {
- my ($class, @slurp) = @_;
-
- my $self = $class->SUPER::new(@slurp);
-
- $self->add_sub_layouts([
- SL::Layout::None->new,
- ]);
-
- $self;
+sub init_sub_layouts {
+ [ SL::Layout::None->new ]
}
sub start_content {
'array' => [
'add_stylesheets_inline' => { interface => 'add', hash_key => 'stylesheets_inline' },
'add_javascripts_inline' => { interface => 'add', hash_key => 'javascripts_inline' },
- 'sub_layouts',
- 'add_sub_layouts' => { interface => 'add', hash_key => 'sub_layouts' },
+ 'sub_layouts', => { interface => 'get_set_init' },
+ 'add_sub_layouts' => { interface => 'add', hash_key => 'sub_layouts' },
],
);
@{ $_[0]->{javascripts_inline} || [] };
}
+sub init_sub_layouts { [] }
+
#########################################
# Interface
use SL::Layout::Top;
use SL::Layout::MenuLeft;
+use SL::Layout::None;
-sub new {
- my ($class, @slurp) = @_;
-
- my $self = $class->SUPER::new(@slurp);
-
- $self->add_sub_layouts([
+sub init_sub_layouts {
+ [
SL::Layout::Top->new,
SL::Layout::MenuLeft->new,
SL::Layout::None->new,
- ]);
-
- $self;
+ ]
}
1;
use List::Util qw(max);
use URI;
-sub new {
- my ($class, @slurp) = @_;
-
- my $self = $class->SUPER::new(@slurp);
-
- $self->add_sub_layouts([
- SL::Layout::None->new,
- ]);
-
- $self;
+sub init_sub_layouts {
+ [ SL::Layout::None->new ]
}
sub pre_content {
use URI;
-sub new {
- my ($class, @slurp) = @_;
-
- my $self = $class->SUPER::new(@slurp);
-
- $self->add_sub_layouts([
- SL::Layout::None->new,
- ]);
-
- $self;
+sub init_sub_layouts {
+ [ SL::Layout::None->new ]
}
sub pre_content {
use URI;
-sub new {
- my ($class, @slurp) = @_;
-
- my $self = $class->SUPER::new(@slurp);
- $self->add_sub_layouts(
+sub init_sub_layouts {
+ [
SL::Layout::Top->new,
SL::Layout::None->new,
- );
- $self;
+ ]
}
sub start_content {