Added the FAQ wobject and some new features to Wobject.pm.

This commit is contained in:
JT Smith 2002-05-14 03:50:26 +00:00
parent 295e1e3c16
commit 4c80c7a559
4 changed files with 288 additions and 350 deletions

View file

@ -79,6 +79,34 @@ sub _getPositions {
#-------------------------------------------------------------------
=head2 description ( )
Returns this instance's description if it exists.
=cut
sub description {
if ($_[0]->get("description")) {
return $_[0]->get("description").'<p>';
}
}
#-------------------------------------------------------------------
=head2 displayTitle ( )
Returns this instance's title if displayTitle is set to yes.
=cut
sub displayTitle {
if ($_[0]->get("displayTitle")) {
return "<h1>".$_[0]->get("title")."</h1>";
}
}
#-------------------------------------------------------------------
=head2 duplicate ( [ pageId ] )
Duplicates this wobject with a new wobject ID. Returns the new
@ -107,7 +135,7 @@ sub duplicate {
displayTitle => $_[0]->get("displayTitle"),
processMacros => $_[0]->get("processMacros"),
startDate => $_[0]->get("startDate"),
endDate => $_[0]->get("startDate"),
endDate => $_[0]->get("endDate"),
templatePosition => $_[0]->get("templatePosition")
});
return $w->get("wobjectId");