[pmwiki-users] PData support for pagelisting images

Patrick R. Michaud pmichaud at pobox.com
Thu Sep 7 14:03:57 CDT 2006

On Thu, Sep 07, 2006 at 05:52:54PM +0000, Pico wrote:
> Patrick R. Michaud <pmichaud <at> pobox.com> writes:
> > 
> > On Thu, Sep 07, 2006 at 04:00:33PM +0000, Pico wrote:
> > > Patrick R. Michaud <pmichaud <at> pobox.com> writes:
> > > > 
> > > > On Thu, Sep 07, 2006 at 01:56:00PM +0000, Pico wrote:
> > > > > Will the new PData {$:var} support pagelisting images?  
> [snip]
> > I'm not entirely sure why the pagelist part in Test.PData isn't working.
> > I suspect it has something to do with the order in which markup
> > substitutions are taking place inside the pagelist output.  Or perhaps
> > there's just something else weird about the Test.PData page.
> > 
> > Since the implementation of pagelists and page content variables is going
> > to be substantially reworked anyway, I'm not wanting to spend too much
> > time tracking this particular one.
> Might as well mention it here.  Are you considering the possibility that
> pagelists might (one day) also grab data from other sources, and here I am
> thinking separate databases and, specifically, mySQL?  

I'm thinking that page variables could be used to grab data from other 
sources, but I'm not planning for pagelists to do it.  Pagelists are for
generating lists of pages -- if we need a list of other things (e.g., records
in a MySQL table), that really ought to be a different directive.

However, this doesn't mean that the other directive can't make use of
page variables, pagelist templates, etc.  :-)

> Looking at pagelists, I assume that one of the alternatives (that you don't
> like) would be to allow {=$:var}, when used within a page, to specify the 
> value in that page, for example:
>      FirstName: Patrick
>      LastName: Michaud
>      FullName: {=$:FirstName} {=$:LastName}

While this works for pagelist, I'm not so sure that it works for
a simple {OtherPage$:FullName} in a markup text.  We'd have to assume that 
the '=' in the FullName: definition is somehow changed to "OtherPage"
even though there's not an active pagelist.

And I'd wonder what to do if a pagelist template ended up doing
{OtherPage$:FullName} -- then does {=$:FirstName} refer to OtherPage
or to the current page in the pagelist that did {OtherPage:$FullName}.

> I haven't tested this, but does specifying a page name in an attach directive
> work when uploads only uses group subdirectories (without additional page
> subdirectories).  For example, if uploads directory structure is:
> /uploads
>  /PmWiki
>  /Test
>   somepic.jpg
> Will "Attach:Test.SomePage/somepic.jpg" work, or would the link have to be
> reduced to "Attach:Test/somepic.jpg"?

Short answer:  Attach:Test.SomePage/somepic.jpg will still work.

Long answer: 
Attachments are always attached to *pages*, never to groups.  The link
Attach:Test/somepic.jpg does not mean "somepic.jpg in the Test group", it
means "somepic.jpg" as attached to [[Test]].  If attachments are organized
per-group, and there's a page in the current group named Test, or if there's
no Test.Test or Test.HomePage, then "Attach:Test/somepic.jpg" will be
somepic.jpg in the current group, not the Test group.

With Attach: it's always best to use a full pagename if wanting to refer to
the attachments of other pages.


More information about the pmwiki-users mailing list