[cgi-wiki-dev] Creating URLs

Kake L Pugh cgi-wiki-dev@earth.li
Tue, 26 Oct 2004 05:44:51 +0100


On Fri 22 Oct 2004, Tom Insam <tom@jerakeen.org> wrote:
> The formatter modules all need a way of turning a node name into an url 
> for embedding in <a> tags. The wiki code itself will need to turn node 
> names into urls for linking from various other places. I'd like my Node 
> object to know what their own urls are. And preferably I'd like the 
> code that turns a name into an url to live in the same source file as 
> the code that takes a passed CGI request parameter and turns it into a 
> node name. Thus it seems to make sense to put this code into 
> CGI/Wiki.pm itself.

CGI/Wiki.pm doesn't do any actual CGI and I don't want it to start
having to care about how the information it spits out is output.

I think what you want is an extension of the node_name_to_node_param
and node_param_to_node_name methods in CGI::Wiki::Formatter::UseMod
- see also the make_internal_link (etc) methods in there.

Kake