[pmwiki-devel] Templates and value arrays
pmwiki at solidgone.com
Tue Jul 22 20:52:04 CDT 2008
Sorry for the delayed response. I wanted to get the cookbook out there
for use. Now I'm into templating again.
To be honest, I'm not understanding the approach you're suggesting. I
have some questions to specific parts of your reply below, but perhaps
I'll try to summarize what I think you might mean.
1] Create a page store, with page templates for albums and photographs.
2] Continue to use GroupFooter to contain the cookbook markup.
3] Inside the markup function, read in the pagestore template.
4] Use regex to replace $xxx variables with actual values in the template.
5] From the markup return the replaced template text -- thus generating
the 'virtual page' for the reader.
I don't think I have this right, as I'd be re-writing some of what
PmWiki already offers. Particularly around . I'm also not using
pagelists, which you're recommending.
Perhaps another approach is to use different skin templates based on
markup. I suspect this isn't possible due to processing. By the time
we're in markup the skin is likely already set.
> Pagestores are used to define...
Turns out I actually use pagestores, I just wasn't familiar with the term.
> In your case, the page store would also create virtual
> pages. Pmwiki would think that the pages are real, but
> they would simply be a lookup into picasa.
Not sure I understand this. To me a virtual page is one which does not
exist. In my case, the reader thinks the page exists because I use a
GroupFooter to contain the markup, which causes the html output.
>> So, here you suggesting that the header/footer would
>> contain the page variables to display image data?
> Yes, but it would be templated in the footer/header
> so as to not include the page name. This would
> then render a common layout for each image.
Not following. How is something templated in the footer?
>> Part of my challenge here is understanding how this would
>> this work with multiple images on a single page?
> This is where you would do something similar to above,
> but with a pagelist template. So to put more than one
> image on a page you would create a pagelist that returns
> all the images (virtual pages of images actually) that
> you want to display and then you would use a template to
> display them however you want.
Okay, the cookbook returns a list of albums, or images. But not sure
that helps. Pointing a pagelist to the markup generated image list
doesn't work. As far as I can see pagelists don't work against
I'm not sure anyway how this would function. Let's say that I have a
markup in the GroupFooter. The markup produces a list. Now, somewhere
else (where) I use a pagelist with a template to create the template
'formatted' page. But where is that somewhere?
Or would we simply have one page with markup in the GroupFooter
generating the list; and another page with markup in the actual page,
which uses pagelist+template. This will get tricky when a reader clicks
an album cover and we generate a list of images. Hmmm. Need to think on
> Then you could even create albums with a standard
> template by using another group, say "Album" and this
> might have virtual pages that return wikitrails of
> images as the pagetext. You could then put a generic
> pagelist in the Album.GroupHeader which simply uses
> the current page as a trail to get its pagelist from
> making each album automatically with a pagelist!
> Make a little sense?
Well I certainly appreciate the suggestions, and it gave me some ideas. :)
More information about the pmwiki-devel