additional template variables
This commit is contained in:
parent
8c9159a582
commit
1cf73bc1b3
3 changed files with 21 additions and 1 deletions
|
|
@ -131,8 +131,15 @@ sub www_view {
|
|||
}
|
||||
$var{description} = $_[0]->get("description");
|
||||
if ($_[0]->get("convertCarriageReturns")) {
|
||||
$var{description} =~ s/\n/\<br\>/g;
|
||||
$var{description} =~ s/\n/\<br\>\n/g;
|
||||
}
|
||||
$var{"description.full"} = $var{description};
|
||||
$var{"description.full"} =~ s/\^\-\;//g;
|
||||
$var{"description.first.100characters"} = substr($var{"description.full"},0,100);
|
||||
$var{"description.first.20words"} = $var{"description.full"};
|
||||
$var{"description.first.20words"} =~ s/(((\S+)\s+){20}).*/$1/s;
|
||||
$var{"description.first.paragraph"} = $var{"description.full"};
|
||||
$var{"description.first.paragraph"} =~ s/^(.*?)\n.*/$1/s;
|
||||
if ($session{form}{makePrintable}) {
|
||||
$var{description} =~ s/\^\-\;//g;
|
||||
$var{isFirstPage} = 1;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue