On 10/26/07, Tegan Dowling <[EMAIL PROTECTED]> wrote:
> On 10/25/07, Maria McKinley <[EMAIL PROTECTED]> wrote:
> > On 10/25/07, Tegan Dowling <[EMAIL PROTECTED]> wrote:
> > > On 10/25/07, Maria McKinley <[EMAIL PROTECTED]> wrote:
> > > > On 10/25/07, SMETS Stephane     AWL-IT <[EMAIL PROTECTED]> wrote:
> > > > >  -----Original Message-----
> > > > > From:   [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]  On Behalf Of 
> > > > > Maria McKinley
> > > > > Sent:   jeudi 25 octobre 2007 10:42
> > > > > To:     PmWiki Users
> > > > > Subject:        [pmwiki-users] site index
> > > > >
> > > > > Is there a way to automatically generate a site index? I looked
> > > > > through the cookbook, and didn't see one, but I wasn't entirely sure
> > > > > what InterMaps were either.
> > > > >
> > > > > Maria
> > > > > It is called "pagelist" in Pmwiki. Read the doc around pagelist which 
> > > > > is a very powerfull markup
> > > >
> > > > Thanks, that is what I was looking for! I didn't see any way to make it 
> > > > form two columns. Is there a simple way to do this?
> > >
> > > Maria:  What would be in the two columns -- are you picturing tabular
> > > data, or do you just mean breaking a single column into two to
> > > conserve space?
> > >
> >
> > I just want to break a single column into two to conserve space. I
> > understand how to use tables to do this when I am creating the data,
> > but when pmwiki is creating the page on the fly, I'm not sure how to
> > do it.
> >
> > thanks,
> > maria
>
> If you have a single pagelist, I don't know of any way to do it --
> maybe someone does.  But if you have multiple pagelists (or anything
> else), you might find Ben Wilson's little recipe Make Columns handy --
> http://www.pmwiki.org/wiki/Cookbook/MakeColumns
>

You could do some kind of column spliting by adding a modulo function
to MarkupExpr. In your config.php, just add:

  $MarkupExpr['mod'] = '($args[0] % $args[1])';

Then, define a pagelist template such as:

  [[#threecols]]
  (:template first:)
  (:table:)
  (:template each:)
  (:if equal 1 {(mod {$$PageCount} 3)}:)
  (:cellnr:)[[{=$FullName}]]
  (:else:)
  (:cell:)[[{=$FullName}]]
  (:if:)
  (:template last:)
  (:tableend:)
  [[#threecolsend]]

That you may use this like below:

  (:pagelist group=PmWiki fmt=#threecols:)

For the record, the 'mod' function is now already available in latest
MarkupExprPlus recipe.
-- 
Dominique

_______________________________________________
pmwiki-users mailing list
[email protected]
http://www.pmichaud.com/mailman/listinfo/pmwiki-users

Reply via email to