[pmwiki-users] [offlist] Suggested pagelist.php fix (formely Pagelist Extensions)
Pico
pmwiki at ben-amotz.com
Tue Jul 18 20:49:54 CDT 2006
Martin Fick wrote:
> On Tuesday 18 July 2006 11:44, you wrote:
>>> From: Martin Fick <mogulguy at yahoo.com>
[snip]
>> If you could
>> explicitly refer to an existing format, do you agree that a single
>> error message could be included via the template, for example
[snip]
>> (:if equal {>$Group}:)
>> Insert error message here...
>> [[#notfoundend]]
[snip]
> Sure, that's not a bad idea since it can be left blank if people don't want
> error messages.
Martin, I reworked the PITS entry to separate the discussion of
alternative results from possible methods for achieving those results.
In the process, I think I came up with a great idea (great because its
simple): just add a new page (perhaps called PageListNotFound) to the
end of the $FPLTemplatePageFmt array. The contents of that page can
control the results:
1. blank -> blank
2. message -> message
3. format -> format (but escape sequence may need to be omitted)
4. format+message -> format+message
I also identified a possible alternative that is more convoluted, and
dependent on assumptions that I don't know to be correct, but you may
find interesting anyway. Basically, if pagelist references to formats
would work the same way as include directives if a single unspecified
anchor could be processed (i.e. fmt=#unspecified =>
Site.PageListTemplates#) then the top of the Site.PageListTemplates page
could be used to control the results:
1. anchor on first line -> blank
2. message followed by anchor at top -> message
3. format followed by anchor (with not starting anchor or escape
sequence) -> format
4. format+message -> format + message
What do you think? Will either, or both of these, work?
Pico
More information about the pmwiki-users
mailing list