[pmwiki-users] pagelist template brainstorming

Petko Yotov 5ko at free.fr
Sun Feb 18 04:08:01 CST 2007


On Sunday 18 February 2007 06:46, Patrick R. Michaud wrote:
> So, again my questions are:  Would markups such as these make it
> easier or more difficult for people creating pagelist templates?  
> And is the (:first:)/(:each:)/(:last:) syntax appropriate, or
> would a different syntax be more desirable?

Why not use just "each..eachend"? This way there is no need for first and last 
markups: what is before the first "each" and after the "eachend" in the 
template will be included if there are pages. 

Also, the "each group" thing can be greatly simplified if it is just 
  (:each group:)

Example:

  [[#template]]
  !!There are pages found!
  (:each group:)
  ||! {=$Group} ||||||
  (:each:)
  ||{=$FullName}  ||{=$LastModifiedBy} ||{=$LastModified} ||
  (:eachend:)
  {$$PageCount} pages.
  [[#templateend]]

Additionally, in the template there may be a section
  
  (:notfound:)
  Sorry, no pages found for your query.

which would be displayed if zero pages were found.

This way, the template would be split by every "each" and "notfound" markups 
and processed accordingly.

Thanks,
Petko



More information about the pmwiki-users mailing list