several small improvements to lots of stuff
This commit is contained in:
parent
d272e7de58
commit
7cf2c22a95
12 changed files with 122 additions and 64 deletions
|
|
@ -50,6 +50,20 @@ sub DESTROY {
|
|||
}
|
||||
|
||||
|
||||
#-------------------------------------------------------------------
|
||||
|
||||
=head2 goodNightAndGoodLuck ( )
|
||||
|
||||
This should be called at the end of all possible output HTML output. It handles printing out debug and other maintenance tasks.
|
||||
|
||||
=cut
|
||||
|
||||
sub goodNightAndGoodLuck {
|
||||
my $self = shift;
|
||||
if ($self->session->errorHandler->canShowDebug()) {
|
||||
print $self->session->errorHandler->showDebug();
|
||||
}
|
||||
}
|
||||
|
||||
#-------------------------------------------------------------------
|
||||
|
||||
|
|
|
|||
|
|
@ -166,6 +166,7 @@ The unique identifier for the template to retrieve.
|
|||
|
||||
sub process {
|
||||
my $self = shift;
|
||||
$self->sent(1);
|
||||
my %var;
|
||||
$var{'body.content'} = shift;
|
||||
my $templateId = shift;
|
||||
|
|
@ -234,6 +235,28 @@ sub session {
|
|||
|
||||
#-------------------------------------------------------------------
|
||||
|
||||
=head2 sent ( boolean )
|
||||
|
||||
Returns a boolean indicating whether the style has already been sent. This is important when trying to set things to the HTML head block.
|
||||
|
||||
=head3 boolean
|
||||
|
||||
Set the value.
|
||||
|
||||
=cut
|
||||
|
||||
sub sent {
|
||||
my $self = shift;
|
||||
my $boolean = shift;
|
||||
if (defined $boolean) {
|
||||
$self->session->stow->set("styleHeadSent",$boolean);
|
||||
return $boolean;
|
||||
}
|
||||
return $self->session->stow->get("styleHeadSent");
|
||||
}
|
||||
|
||||
#-------------------------------------------------------------------
|
||||
|
||||
=head2 setLink ( url, params )
|
||||
|
||||
Sets a <link> tag into the <head> of this rendered page for this page view. This is typically used for dynamically adding references to CSS and RSS documents.
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue