[Pmwiki-users] Alternative to '?' for links to pages that don't exist

Jonathan Scott Duff duff
Wed Jul 7 08:43:39 CDT 2004


On Wed, Jul 07, 2004 at 01:15:49PM +0200, Christian Ridderstr??m wrote:
> Hi
> 
> I was just writing some stuff where I often used '?' in the text and I 
> found that it was annoying that '?' both can be a plain '?' as well as a 
> link to a page that doesn't exist.
> 
> Is there a cookbook recipy for replaing '?' with something like 
> '[Create]'?

Not that I know of, but ...

> I also think it'd be a good idea if this link got some more attributes
> that explains what it will do. Currently (pmwiki-0.6.21) produces HTML
> like this (for the markup "SomePage"):
> 
> 	<span class='createlink'>SomePage</span><a class='createlink' 
> 	   href='http://wiki.net/Main/SomePage?action=edit'>?</a>
> 
> Here's an alternative
> 
> 	<span class='createlink'>SomePage</span><a class='createlinkA'
>            href='http://wiki.net/Main/SomePage?action=edit'
>            title='Use this link to create the page "SomePage"'>[Create]</a>

since you already have the HTML you want, you're more than halfway
there.  Just set $WikiPageCreateFmt in your config.php like so:

$WikiPageCreateFmt = "<span class='createlinkA'>\$LinkText</span><a class='createlink' href='\$PageUrl?action=edit' title='Use this link to create the page \"\$PageName\"'>[Create]</a>";


-Scott
-- 
Jonathan Scott Duff
duff at pobox.com



More information about the pmwiki-users mailing list