[pmwiki-users] (:cell:) in pagelist template?

Martin Fick mogulguy at yahoo.com
Tue Mar 27 11:38:55 CDT 2007


--- "Patrick R. Michaud" <pmichaud at pobox.com> wrote:

> On Tue, Mar 27, 2007 at 07:22:02AM +0100, SteP
> wrote:
> > (version 2.20beta38) I want to add a table column
> only when (:pagelist:) 
> > outputs something. I thought I could use the
> following format
> > [[#f]]
> > (:template first:)
> > (:cell:)
> > (:template each:)
> > test
> > [[#fend]]
> > 
> > and page text
> > 
> > (:table class"test" border=1:)
> > (:pagelist fmt=#f count=1:)
> > (:pagelist fmt=#f count=1:)
> > (:tableend:)
> > 
> > however this results in two separate, stacked
> tables instead of the two 
> > side-by-side columns I was expecting. It looks
> like the (:table:) markup 
> > line is ignored, so each (:cell:) automagically
> becomes a whole table.
> 
> No, what is really happening is that any open
> tables, divs, or other
> structures inside of (:pagelist:) are automatically
> closed at the
> end of the pagelist command.  In other words,
> (:pagelist:) acts like
> its own complete page, as opposed to generating
> markup that is then
> inserted into the enclosing page.
> 
> So, what is happening is that the table generated by
> the (:cell:)
> directive in the first (:pagelist:) command is
> automatically closed
> at the end of the pagelist.  The (:cell:) in the
> second (:pagelist:)
> command then starts a new table.
> 
> Note that the (:table:) directive doesn't actually
> start a new table,
> it's the (:cell:) or (:cellnr:) directive that does
> it.  All that the
> (:table:) directive does is set attributes for any
> tables that follow.
> 
> > How can I achieve adding a table column only when
> pagelist outputs 
> > something?
> 
> I can't think of a way to do this, as yet.  But see
> my message at [1],
> which proposes the addition of an outputtype=markup
> option which would
> allow (:pagelist:) to return the markup to the
> enclosing page, as
> opposed to rendering it standalone.
> 
> [1]
>
http://www.pmichaud.com/pipermail/pmwiki-users/2007-March/041000.html
> 

Again, referring to my reply in that thread, I feel
that the above should just work and that plts are
inherently broken if it doesn't.  I think that adding
a special option to fix this is the wrong solution and
will only get us deeper into a bad implementation. 
Should we not take advantage of the beta status to fix
(not patch) this implementation also? :)

-Martin



 
____________________________________________________________________________________
Don't get soaked.  Take a quick peek at the forecast
with the Yahoo! Search weather shortcut.
http://tools.search.yahoo.com/shortcuts/#loc_weather



More information about the pmwiki-users mailing list