[pmwiki-users] Pagelist formatting
    Martin Fick 
    fick at fgm.com
       
    Tue Apr 26 16:06:50 CDT 2005
    
    
  
  Now that you have the new pagelist code written, I thought
of a new way to really confuse people. :)
  What if the (:pagelist:) could use wiki formatting to
describe how to output the list?  Maybe using tags like 
this:
Loop for all pages:
(:pagelist:)
(:pagelistend:)
Only executed for the first (or last) page of a group:
(:pagelistgroup [last]:)
(:pagelistgroupend:)
Variables for current pagelist page:
{$$Name}} {$$Group} {$$Title} ...
To simulate some of the current formats:
-bygroup:
  (:pagelist:)
  (:pagelistgroup:)
  {$$Group}}/
  (:pagelistgroupend:)
  ->[[ {$$Group}.{$$Name} | {$$Name} ]]
  (:pagelistend:)
-simple:
  (:pagelist group=Group:)
  * [[{$$Group}.{$$Name}]]
  (:pagelistend:)
-group:
  (:pagelist:)
  (:pagelistgroup:)
  * [[{$$Group}}]]
  (:pagelistgroupend:)
  (:pagelistend:)
-- These could easily then be enhanced like this:
-simple but use page title instead of Name:
  (:pagelist:)
  (:pagelistgroup:)
  {$$Group}}/
  (:pagelistgroupend:)
  ->[[ {$$Group}.{$$Name} | {$$Title} ]]
  (:pagelistend:)
-Make a table for each group with Name, Title, author:
  (:pagelist:)
  (:pagelistgroup:)
  {$$Group}}/
  || Page || Title || Author ||
  (:pagelistgroupend:)
  || [[ {$$Group}.{$$Name} | {$$Name} ]] || {$$Title}} || {$$Author} ||
  (:pagelistend:)
-Include an section from each page: 
  (could be nice for search results if a variable were 
   provided with line numbers of match)
 
 
  (:pagelist:)
  
  ![[{$$Group}.{$$Name} | {$$Title} ]]
  
  ->(:include {$$Group}.{$$Name}#Begin#End:)
    
  (:pagelistend:)
  I realize that this might be too complicated for what
pmwiki was intended to be, but I thought that it might make
a nice optional addition.  I'm not sure how to go about
implementing such a beast, but I figured I'd suggest it
anyway.
  -Martin
    
    
More information about the pmwiki-users
mailing list