[pmwiki-users] Hidden page-text-variables, link targets, and pagelists

The Editor editor at fast.st
Tue Mar 13 10:35:19 CDT 2007


On 3/13/07, Patrick R. Michaud <pmichaud at pobox.com> wrote:
> On Tue, Mar 13, 2007 at 10:42:35PM +1100, Kathryn Andersen wrote:
> > I'm using PmWiki 2.2beta34.
> >
> > I've run into what appears to be a bug.  I've reproduced it
> > at
> > http://www.pmwiki.org/wiki/Test/PageListLinkWithPtv1
> > http://www.pmwiki.org/wiki/Test/PageListLinkWithPtv2
> > http://www.pmwiki.org/wiki/Test/PageListLinkWithPtv3
> > ...
> > Maybe it's supposed to be a feature (that is, hidden is hidden) but I
> > wasn't expecting that changing a page-text-variable from visible to
> > hidden would change the behaviour of pagelists as well as changing how
> > it shows on the page.
>
> I'll have to think about this one a bit.  Currently, when a page
> is rendered any (:textvar:...:) markup is "hidden" by removing it
> entirely from the page markup.  This happens before links are
> processed, so that any link markup that exists inside of a hidden
> page is never processed as a link.
>
> Thinking of it slightly differently -- there's not really a
> link from PageListLinkWithPtv1 to PageListLinkWithPtv3.
> At least, we never see one in the output.  It's almost identical
> to placing a "link" within a comment:
>
>     (:comment this does not [[contain]] any links :)
>
> Currently PmWiki doesn't treat this as being a link to another
> page either.
>
> At the moment I don't have a good overall solution for this one,
> but I'm open for suggestions.
>
> Some possible alternatives that might work for you:
>
> 1.  Instead of hidden page text variables, try a hidden definition list:
>
>     : :%comment list%
>     :Link1:[[Test/PageListLinkWithPtv2]]
>     :Link2:[[Test/PageListLinkWithPtv3]]
>
> 2.  Use conditional markup:
>
>     (:if false:)
>     :Link1:[[Test/PageListLinkWithPtv2]]
>     :Link2:[[Test/PageListLinkWithPtv3]]
>     (:if:)
>
> 3.  A hidden paragraph:
>
>     %p comment%
>     Link1: [[Test/PageListLinkWithPtv2]]
>     Link2: [[Test/PageListLinkWithPtv3]]
>
> Pm


While I appreciate these suggestions, and don't have a specific need
in this area at the moment, it would be nice to come up with a
solution.  The work I'm doing on ZAP now will ONLY store variables in
the hidden format, which will make this something of a liability.

It also explains why I never could get my tagging system to work
exactly as desired.  I vaguely remember having some problems getting
the categories to work properly when they were stored as hidden text
vars and had to come up with some workaround or other.

It would be useful if there was some way to do this...  But then
again, some fixes are more trouble than they are worth.  Thanks for
everything Patrick!

Cheers,
Dan

PS.  One idea might be to store data like this on related pages, like:

Link-Group.Name1, Link-Group.Name2.

Then you could do a pagelist on group=Link-{$Group} or Link-* and then
in the template spit back a PV built on substr($Group, 5).{$Name} or
something along those lines.

(Or $basegroup)



More information about the pmwiki-users mailing list