[pmwiki-users] making pagelist template produce a cell, not a table

The Editor editor at fast.st
Fri Jan 19 05:47:15 CST 2007


On 1/19/07, Jean-Fabrice [gmail] <jeanfabrice at gmail.com> wrote:
> Hi list,
>
> I making some test to have a pagelist template rendering only rows,
> giving the ability to produce such code :
>
> (:table:)
> (:cellnr:)head1
> (:cell:)head2
> (:pagelist Group=aGroup fmt=#myFmt:)
> (:pagelist Group=anotherGroup fmt=#myFmt:)
> (:pagelist Group=athirdGroup fmt=#myFmt:)
> (:tableend:)
>
> and define #myFmt to be :
> (:cellnr:)one cell
> (:cell:)another cell
>
> this is not working since each cycle on #myFmt produce the "lacking"
> table around the cells.
>
> any clue ?


You could try putting the table and tableend in the template, like this:

[[#zapdocs]]
(:if equal {<$Group}:)(:table:)
(:cellnr bgcolor=#e4e4e4 colspan=2:)'''{$$heading}'''
(:if:)
(:cellnr bgcolor=#f7f7f7:)[[{=$FullName}|{=$:docid}]]
(:cell bgcolor=#f7f7f7:){=$:doclabel}
(:if equal {>$Group}:)(:tableend:)
[[#zapdocsend]]

Note I use it with a pagelist like this: (:pagelist fm#zapdocs
heading='My stuff':) so I can have different headings on different
tables and still just have one template.

Cheers,
Dan




More information about the pmwiki-users mailing list