[pmwiki-users] include failure

christian.ridderstrom at gmail.com christian.ridderstrom at gmail.com
Fri Jan 27 15:59:48 CST 2006


On Fri, 27 Jan 2006, JB wrote:

> I dont see this.  While it is true that people won't miss content that
> they cannot see why would anyone want the possibility of missing
> content?  I hope this is not done at a nuclear power plant!

I use several (:include:) to build up the sidebar for instance. It goes
something like this:

In Site.SideBar
	
	...
	(:include SideBar-groupspecific:)
	...

which allows me to optionally create a page 'SideBar-groupspecific' in a 
group and have it automatically appear in the sidebar when you're visiting 
a page in that group.

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.

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:)

For me it's very convenient to have include fail without an error message.

regards
/Christian

-- 
Christian Ridderström, +46-8-768 39 44               http://www.md.kth.se/~chr






More information about the pmwiki-users mailing list