[pmwiki-users] Behaviour of (:pagelist fmt=...:) with bad format argument

Patrick R. Michaud pmichaud at pobox.com
Sun May 28 09:35:36 CDT 2006


On Sun, May 28, 2006 at 03:21:42PM +0200, christian.ridderstrom at gmail.com wrote:
> What is the indented behaviour of (:pagelist fmt=...:) when it's argument 
> is incorrect somehow?
> 
> I think that for instance
> 
> 	(:pagelist fmt=#doesNotExist count=10:)
> 
> should result in some kind of error message if the anchors
> [[#doesNotExist]] and [[#doesNotExistend]] don't exist.

Note that this somewhat implicates the handling of 
(:include PageName#doesNotExist:), since they both currently 
use the same code.  Plus there's my general aversion to 
"error messages", since error messages always imply a 
plethora of additional configuration options and workarounds
that have to be accommodated.

> While I am at it, it'd be nice if the anchors could be written as follows:
> 
> 	[[#someFormat]]
> 	...
> 	[[#someFormatend]] (or [[#someFormatEnd]] or [[#someFormat-end]])
> 
> that would make it clearer to read in my opinion. Is this possible today?

First, the name of the "end anchor" doesn't matter -- the
fmt=xyz code just reads the section starting with [[#xyz]] and continuing
to the next anchor, whatever it happens to be.  

So, if you're saying that it would be clearer if we had all of the
anchors as [[#xyzFormat]] instead of [[#xyz]] -- I don't entirely
agree.  The common case is that any given pagelist template will be
used in multiple (:pagelist:) directives; i.e., more people will be
writing (:pagelist:) directives than will be creating pagelist
templates.  Thus, we should focus on what works better as a fmt=
parameter in (:pagelist:).  For me, I think that (:pagelist fmt=#xyz:) 
is much better than (:pagelist fmt=#xyzFormat:).

Pm




More information about the pmwiki-users mailing list