[pmwiki-users] include failure

Patrick R. Michaud pmichaud at pobox.com
Fri Jan 27 18:41:24 CST 2006


On Fri, Jan 27, 2006 at 10:59:48PM +0100, christian.ridderstrom at gmail.com wrote:
> I use this technique in many places, i.e. using (:include:) to "pull-in" 
> something only if the corresponding page exists. Hmm... thinking about it, 
> I wonder if I'd like to have something like this:
> 
> 	(:include PagesToInclude* :)
> 
> In other words, allow a wildcard in the include directive and include a 
> bunch of pages in one go. Or perhaps somehow using (:pagelist:) with a 
> special template to not just list the pages, but also include them. Or 
> perhaps just an excerpt of each page.

(:pagelist:) is probably the way to go.  A simple version will
probably be 

    (:pagelist name=PagesToInclude* fmt=#include:)

Eventually I'll probably create a fmt=include (no #) option
that allows include options to be included in the (:pagelist:)
command:

    (:pagelist name=PagesToInclude* fmt=include lines=1..5:)

> Anyway, in the case of the sidebar, if 'invisible failure' wasn't
> possible, I'd have to use something like
> 
> 	(:if exists SideBar-fieldspecific:)
> 	(:include SideBar-fieldspecific:)
> 	(:ifend:)

You could always do

    (:include SideBar-fieldspecific error="" :)

Pm




More information about the pmwiki-users mailing list