[pmwiki-users] Core and question marks

Pico pmwiki at ben-amotz.com
Mon Aug 28 10:28:15 CDT 2006

Pico wrote:
> Patrick R. Michaud wrote:
>> On Sun, Aug 27, 2006 at 11:41:01AM -0400, The Editor wrote:
>>> According to the recipe at
>>> http://www.pmwiki.org/wiki/Cookbook/RemoveQuestionMark
>>> "If you want all links to non-existent pages in specific groups (even
>>> when linked to [from] outside of these groups), to continue to link to
>>> the non-existent page, and to not link to the edit-page, you will have
>>> to patch your pmwiki.php."
>> FWIW, when people say "you have to patch pmwiki.php", it's almost
>> never true in an absolute sense.  One can always create a replacement 
>> function for LinkPage() in a local script, and have it be used 
>> instead of PmWiki's normal LinkPage() function.  Thus
>>     $LinkFunctions['<:page>'] = 'MyCustomLinkPage';
>> will call MyCustomLinkPage (instead of the built-in LinkPage() function)
>> whenever PmWiki needs to generate a link to another page.
> So, one request, if you would.
> How would I change it to add a span within a portion of the link's 
> displayed text?  The html would look like this:
> <a href="http://www.meyerweb.com/eric/css/">Links<span>A collection of 
> things which interest me, and might interest you</span></a>
>  From a page about script-less css popups.  See 
> http://meyerweb.com/eric/css/edge/popups/demo.html

The looming question, of course, is why would you need to tinker with 
the LinkPage() function when you can always add a span to any link by 
simply inserting a wikistyle?  The wikistyle approach works quite well, 
as Pm has just demonstrated at Test/CSSPopups.  (Actually, I had been 
playing with that when I posted to this thread, see 

The one added twist I would like to accomplish is to be able to add a 
similar span without necessarily having to provide an alias.  That's not 
a huge deal, because you can simply use the Name variable to supply the 
alias if what you want is the span without changing the displayed link, 
for example, in my pagelist template, I'll use:


But for other (non-pagelist) links, it would be nice not to have to 
supply an alias when you prefer just to use the page name.

Is there a workaround that I haven't stumbled upon?  I guess I could use 
the title, like this:

[[Group.Page|+%popup%This is the text to appear in the popup]]

And, if I didn't create a title, that would use the page name.

So, in the end, I think I should just stick with the phenomenally 
flexible core markup that Pm creates, maintains and evolves.


More information about the pmwiki-users mailing list