[Maypole] list macro - possible improvement

Aaron Trevena teejay@droogs.org
Wed, 23 Jun 2004 00:30:48 +0100 (BST)


in case you want to link to other mod_perl handlers or hardcoded links
(like adding a homepage to the navbar)

[%
MACRO link(table, command, additional, label) BLOCK;
    '<A HREF="' _ base;  table _ "/" IF table; command _ "/" IF command; additional _ '">';
    label;
    "</A>";
END;
%]

Adding the conditional concatonation means you won't get
'file error - /: absolute paths are not allowed (set ABSOLUTE option)'
messages anymore when passing empty values to the link macro

Might not be that useful but when you use url mapping tis nice to handle
non-maypole links in a similar way.

cheers,

A.

-- 
Aaron J Trevena - Perl Hacker, Kung Fu Geek, Kitten Owner