fixed a syntax error and the Page and PageTitle macros

This commit is contained in:
JT Smith 2005-01-07 17:14:16 +00:00
parent 81ff5f1c48
commit 2050de56cd
3 changed files with 11 additions and 10 deletions

View file

@ -12,14 +12,15 @@ package WebGUI::Macro::PageTitle;
use strict;
use WebGUI::Session;
use WebGUI::URL;
#-------------------------------------------------------------------
sub process {
if ($session{form}{op} || $session{form}{func}) {
return '<a href="'.WebGUI::URL::page().'">'.$session{page}{title}.'</a>';
} else {
return $session{page}{title};
if (exists $session{asset}) {
if ($session{form}{op} || $session{form}{func}) {
return '<a href="'.$session{asset}->getUrl.'">'.$session{asset}->get("title").'</a>';
} else {
return $session{asset}->get("title");
}
}
}