As Anchor |
|
|
We have a word that looks like it should be a hyperlink.
If it is defined in the database then make the whole
word a link to that page. If not, then add a question mark
that links to the appropriate edit page.
sub AsAnchor { local($title) = pop(@_); defined $db{$title} ? "<a href=\"$ScriptUrl\?$title\">$title<\/a>" : "$title<a href=\"$ScriptUrl\?edit=$title\">?<\/a>"; } Note that if AsAnchor is called after the database has been closed, it will answer a link to the edit page.
|
Last edited November 11, 1997 Return to WelcomeVisitors |