[Pmwiki-users] Free link questions

Patrick R. Michaud pmichaud at sci.tamucc.edu
Mon Mar 17 19:02:14 CST 2003

On 18 Mar 2003, John Rankin wrote:

> I have some comments/questions on using free links in PmWiki 0.4.3 (which is just excellent)

Thanks--but it's your (and others') terrific suggestions that are largely
responsible.  :-)

> 1. In combination with [[...]]
> I wonder if [[{{page |name}}link reference]] might reasonably be 
> interpreted as equivalent to [[{{page name}} page link reference]] 
> -- if the author has used either the | or suffix option inside [[...]] 
> then just ignoring it seems a bit harsh.

I've thought about this (based on a previous comment) but I'm a bit
worried that it breaks the symmetry of other double-bracket links and
might be a bit tricky to implement.  So far I've been reserving judgement
on it.  Anyone have any strong arguments either way beyond the symmetry

> 2. - and | in combination
> {{hyphenated-|page}}links doesn't seem to be allowed, whereas 
> {{hyphenated|-page}}links is.

I couldn't come up with a good pattern that allowed the hyphen without also
allowing multi-hyphens (e.g., hyphenated----page) or other complications.
Plus one can always write {{hyphenated|-page}}-links to get the same result
as the first.  I'll re-examine the pattern.

> 3. In combination with [[$Title]]
> The structure of our encyclopedia uses 2 main groups, each with the 
> same set of page titles. We had been using [[GroupB/[[$Title]] Group B]] 
> in a GroupA/GroupHeader (and vice vesa). This no longer works. We can 
> change it to [[GroupB/{{[[$Title]]}} Group B]] to achieve the same effect. 
> Is there a different variable we should be using that works as intended 
> with both WikiWords and {{free links}}? I imagine we would create a 
> reference to [[$Tlink]].

I can certainly add [[$Tlink]] to the allowed markup.  You could try it
as a local modification by doing $DoubleBrackets['[[$Tlink]]'] = '$Tlink';
and see if it works--if yes I can add it to a new release.

> 4. Definitions of variables
> If I have understood what's going on, for {{free links}}:
> $Title and $Titlespaced are synonyms; $Title_ is the title with 
> spaces replaced with the replace character. $Tlink is the same as {{$Title}}.

Not exactly.  $Title is the title with underscores replaced by spaces.
$Titlespaced is $Title with spaces inserted before each capitalized word 
or number.  $Title_ is the exact pagename with no underscore replacements 
and no spaces (i.e., as it appears in a URL).  $Tlink is {{$Title_}}.

> for WikiWords:
> $Title and $Title_ and $Tlink are synonyms.

Effectively, yes, except that $Tlink won't honor the $SpaceWikiWords setting.

> (I have tripped on $Tlink when using it in a local customisation to 
> return the first paragraph of another page when that page doesn't exist. 
> I have managed to have $Tlink come out as {{$Title_}} and as something 
> else again. This is administrator error, I think.)

I'm not sure I understand here, but perhaps my explanations above help...?

I'm very open for additions to the $DoubleBracketsArray if it makes
things cleaner/easier to implement.


More information about the pmwiki-users mailing list