Added link when op or func is found in the URL.
This commit is contained in:
parent
3f67e1c293
commit
3121a62822
2 changed files with 12 additions and 2 deletions
|
|
@ -12,12 +12,22 @@ package WebGUI::Macro::PageTitle;
|
|||
|
||||
use strict;
|
||||
use WebGUI::Session;
|
||||
use WebGUI::URL;
|
||||
|
||||
#-------------------------------------------------------------------
|
||||
sub _replacement {
|
||||
if ($session{env}{QUERY_STRING} =~ /op/ || $session{env}{QUERY_STRING} =~ /func/) {
|
||||
return '<a href="'.WebGUI::URL::page().'">'.$session{page}{title}.'</a>';
|
||||
} else {
|
||||
return $session{page}{title};
|
||||
}
|
||||
}
|
||||
|
||||
#-------------------------------------------------------------------
|
||||
sub process {
|
||||
my ($output);
|
||||
$output = $_[0];
|
||||
$output =~ s/\^PageTitle\;/$session{page}{title}/g;
|
||||
$output =~ s/\^PageTitle\;/_replacement()/ge;
|
||||
return $output;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -27,7 +27,7 @@ sub _recurse {
|
|||
} else {
|
||||
$output = _recurse($data{parentId},$_[1]);
|
||||
}
|
||||
return $output;
|
||||
return $output;
|
||||
}
|
||||
|
||||
#-------------------------------------------------------------------
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue