[pmwiki-users] Maintaining recipes that require non-relative urls ({*$var})

Patrick R. Michaud pmichaud at pobox.com
Mon Oct 2 08:49:51 CDT 2006


On Mon, Oct 02, 2006 at 06:59:41AM -0400, Pico wrote:
> When relative urls were introduced there was an acknowledgment that 
> relative links will "break" skins, such as Triad?  At the time I assumed 
> that the reference was simply to the fact that the distributed pages 
> would need to change various links from {$var} to {*$var}, but now I am 
> realizing that the issue may be bigger than that when it comes to 
> maintaining and distributing recipes that will work with all recent 
> various versions of PmWiki: If you "fix" certain links by changing them 
> from {$var} to {*$var}, what will those new links do on prior versions 
> of PmWiki (2.1.26 and earlier)?  

Currently it breaks them.  However, if a skin or recipe wants to
use {*$var} with pre-2.2 versions of PmWiki, the easiest solution
is to just add the {*$var} markup directly:

    if ($VersionNum < 2001900) {
      Markup('{*$var}', '<{$var}',
        '/\\{\\*\\$/e', 
        "'{'.\$pagename.'$'");
    }

Pm




More information about the pmwiki-users mailing list