[pmwiki-users] Unwanted carriage return with pagelist template

Martin Fick mogulguy at yahoo.com
Tue Mar 27 11:28:53 CDT 2007


--- "Patrick R. Michaud" <pmichaud at pobox.com> wrote:
> The long answer: The output of pagelist generally
> comes in a 
> <div>...</div> wrapping, so that's probably what is
> causing the 
> linebreak in the output.  And even if we can get rid
> of the <div>, 
> the standalone "4" is still going to end up enclosed
> in its own 
> paragraph (<p>...</p>) so we'd still have some
> difficulty there.
> 
> The topic of inline pagelists recently came up in
> [1]... and at
> the conclusion of that thread we proposed adding a
> 'tag=' option 
> to specify 'div', 'span', or 'none' for the outer
> wrapping of
> the pagelist template.
> 
> That takes care of the outer tag, but the inner
> (<p>) one still remains.
> 
> Today, in another message [2], we've also
> encountered a case where someone wants (:pagelist:) 
> to return the markup to its enclosing page instead 
> of rendering it directly to html.  It would
> be good to support this option as well.
> 
> [1]
>
http://thread.gmane.org/gmane.comp.web.wiki.pmwiki.user/39693/focus=40130
> [2]
>
http://www.pmichaud.com/pipermail/pmwiki-users/2007-March/040971.html
> 
> So, instead of a 'tag=' option, I now propose an
> 'outputtype=' option:
> 
>     outputtype=div          # return pagelist as
> <div>...</div> (current default)
>     outputtype=span         # return as
> <span>...</span>
>     outputtype=html         # return as html, no
> outer wrapper
>     outputtype=markup       # return as markup
> (don't convert to HTML)
> 
> The above template to return a page count could then
> be done as:
> 
>     [[#PageCount]]
>     (:template outputtype=markup:)
>     (:template last:)
>     {$$PageCount}
>     [[#PageCountend]]

I'm wondering if this isn't maybe a little too
complicated and what we maybe really need is a way to
start a line that strips the previous return.  The
perl templates have something like that and it is very
useful.  Since pagelist templates seem to have a
similar need, maybe it is appropriate.  Not only would
this be helpful for pagelists, but also for plain old
section includes.  Extend \ so that it also works at
the beginning of a line:

     \[[#PageCount]]
     \(:template last:)
     \{$$PageCount}\
     \[[#PageCountend]]

Maybe if there were no enclosing div this would work? 


On second thought, do people really need/want the
div/span.  If so, would that more likely be the
special case?  In reality, I think that people would
expect this to even work without any new special \
meanings:

     [[#PageCount]]\
     (:template last:) {$$PageCount}\
     [[#PageCountend]]\

Despite that fact that templates are for advanced
users, I don't want to have to remember a new special
tag to do simple line formatting that I would
intuitively expect to work without it.  The point of
pagelist templates was to use normal wiki formatting,
not specialized template formatting!

-Martin



 
____________________________________________________________________________________
It's here! Your new message!  
Get new email alerts with the free Yahoo! Toolbar.
http://tools.search.yahoo.com/toolbar/features/mail/



More information about the pmwiki-users mailing list