[pmwiki-users] Page with contents of a list

Bronwyn Boltwood bronwyn at bronwynb.info
Thu Mar 23 11:34:31 CST 2006

On 3/23/06, christian.ridderstrom at gmail.com
<christian.ridderstrom at gmail.com> wrote:
> On Wed, 22 Mar 2006, Bronwyn Boltwood wrote:
> > Depending on how long your Ride pages are, you might want to use
> > teasers instead of a full include, in which case you'll need to look
> > at http://pmwiki.org/wiki/PmWiki/IncludeOtherPages.  I can tell you
> > from experience about a couple potholes with teasers:
> > * include goes by lines of source or in-page anchors, not by numbers of words.
> > * if any of those source lines are filled with (:title:), conditional
> > markup, and other things that don't generate any visible output,
> > include grabs them anyway.  You can end up with less or no teaser than
> > you expected to, and some weird effects on your pagelist page, such as
> > messed-up titles, keywords, and so on.
> I'm bringing this to John's attention (he wrote the teasers), just in case
> he missed this post.

In that case, I should point out that I'm not using the proper teaser
markup from the extended markup recipe.  I was doing a quick and dirty
version for a pagelist template:

  (:if auth edit:)%p rfloat meta actions%[[{=$FullName}?action=edit |
Edit Entry]](:ifend:)

  (:include {=$FullName} lines=1..2:)

  [[{=$FullName}|Read more...]]

  * %list meta data%{=$CreationDate}
  (:if !exists Comments.{=$Name} :)
  *[[Comments.{=$Name}?action=browse#addcomment| Illuminate Creation]]
  (:if equal 1 {Comments.{=$Name}$PostCount} :)
  *[[Comments.{=$Name}#comments| 1 Illumination]]
  (:if [ exists Comments.{=$Name} && !equal 1 {Comments.{=$Name}$PostCount} ] :)
  *[[Comments.{=$Name}#comments| {Comments.{=$Name}$PostCount} Illuminations]]
  (:if equal {>$Group}:)
  (:title {$Title}:)(:if:)

What I really wanted was an excerpt of the post -- first N words,
first paragraph, that sort of thing.  I thought about asking Pm to
make (:include:) not include markup that produces no visible output,
but then I realized that this might break things in new and
interesting ways.  Of course, a flag like (:include Group.Page
invisible=no:) might be a good solution.

Perhaps I'll just have to start adding anchors or using John's formal
teaser markup.  My final approach will probably depend on post

I also found out a few weeks back that the edit title recipe doesn't
do the right thing on special pages like PageListTemplates, so I had
to disable it.  A pity.


More information about the pmwiki-users mailing list