[pmwiki-users] trying to understand Pagelist Template Samples

Tegan Dowling tmdowling at gmail.com
Thu Oct 25 21:01:57 CDT 2007


On 10/25/07, Tegan Dowling <tmdowling at gmail.com> wrote:
> On 10/25/07, Maria McKinley <parody at u.washington.edu> wrote:
> > On 10/25/07, Tegan Dowling <tmdowling at gmail.com> wrote:
> > > On 10/25/07, Maria McKinley <parody at u.washington.edu> wrote:
> > > > Hello again,
> > > >
> > > >  I think I am missing something fundamental about how templates for
> > > > pagelists are created.  For each of the template examples, there is
> > > > some code that defines the template followed by the pagelist command
> > > > referring to the template. Where does one put the template definition?
> > > > >From the syntax, it looks like it belongs on a wiki page, rather than
> > > > in a php file. I tried defining the template on the same page that I
> > > > was using it with pagelist, but I couldn't get it to display anything,
> > > > so I think maybe it is suppose to go somewhere else?
> > >
> > > Have you read http://www.pmwiki.org/wiki/PmWiki/PageListTemplates?  I
> > > think the first two sections there (try to) explain it.  If they
> > > don't, re-post!
> > >
> >
> > So, from my reading of that, I thought I could do this (all on one page):
> >
> > [[#teasers]]
> > || '''[[{=$FullName}]]''' - [[Edit -> {=$FullName}?action=edit]]||
> >
> > (:include {=$FullName} lines=4:)
> >
> > (:if ! equal {>$Group}:)
> > -----
> > (:if:)
> > [[#teasersend]]
> >
> > (:pagelist fmt=#teasers group=-PmWiki,-Site,-SiteAdmin,-Profiles
> > name=-RecentChanges:)
> >
> > But, this doesn't seem to work. What have I miss-read?
>
> I didn't read it closely yet, because I wanted to point this out, too:
>  Preview doesn't work until you've saved (and maybe used) the new fmt.
>  Did you determine that your test failed on the basis of a preview?

This might be it:  The fmt= piece of your actual (:pagelist...:)
markup needs to specify the page on which the fmt is defined unless
it's in one of the default locations.  Unless it's in Site/Pagelists
or Site/LocalPagelists (or whatever those are now), you should
specify.  SO change

from
(:pagelist fmt=#teasers group=-PmWiki,-Site,-SiteAdmin,-Profiles
name=-RecentChanges:)

to
(:pagelist fmt=YOURTESTPAGENAMEHERE#teasers
group=-PmWiki,-Site,-SiteAdmin,-Profiles name=-RecentChanges:)



More information about the pmwiki-users mailing list