[pmwiki-users] title directive and links
Patrick R. Michaud
pmichaud at pobox.com
Fri Sep 23 21:16:17 CDT 2005
On Fri, Sep 23, 2005 at 03:39:23PM -0700, Dan Weber wrote:
> Some of the format variables seem to use Wiki markup and some seem to
> use HTML markup. How do I know when I have to use HTML and when I have
> to use Wiki markup? While the HTML approach allows more flexibility the
> Wiki approach is nice because I can use Cookbook entries like the
> PageTitle one.
There's not an easy way to know in general, because different recipes
work with PmWiki pages at different stages of storage and translation.
In the case of $RecentChangesFmt, it's holding things that are to be
stored into pages (RecentChanges), therefore it needs to be wiki markup.
In the case of the search output, it could've been designed to
generate either HTML or Wiki markup. I went with HTML in this case
simply because it allows more flexibility in output, and takes less
time to generate because PmWiki doesn't then have to retranslate things.
I've been looking for a good way to specify page list formats
using wiki markup, but hadn't come up with anything that seemed
reasonable until having seen Cookbook.PageListTemplates, which looks
> --- "Patrick R. Michaud" <pmichaud at pobox.com> wrote:
> > On Fri, Sep 23, 2005 at 10:47:09AM -0700, Dan Weber wrote:
> > > > Currently, search results always show less descriptive page
> > names, so
> > > > sometimes it is not clear what is the page about. Page titles
> > would
> > > > be ideal.
> > >
> > > I was able to change the RecentChanges page format by changing the
> > > following two variables:
> > >
> > > $RecentChangesFmt['$SiteGroup.AllRecentChanges'] = '*
> > > [[$Group.$Name|+]] . . . $CurrentTime $[by] $AuthorLink:
> > > [=$ChangeSummary=]';
> > Excellent...! I hadn't considered this possibility! This simple
> > mechanism for having titles in RecentChanges pages adds a *lot*
> > of weight to the idea of putting [[Page|+]] markup directly in
> > the core.
> > > I could not find a similar approach for the search page though. It
> > > seems to be related to the page index script but those format
> > variables
> > > have html in it and not wiki markup so I am not sure how to
> > activate
> > > the same Title script. Maybe I am just not seeing the relevant Fmt
> > > variable?
> > The relevant Fmt variable is $Title. One mechanism for displaying
> > titles instead of pagenames in (:pagelist:) output is described
> > at http://www.pmwiki.org/wiki/Cookbook/PagelistExplained , in the
> > "Comments/Questions" section. (Yes, I'm planning to move this
> > particular item into its own recipe.)
> > Pm
> pmwiki-users mailing list
> pmwiki-users at pmichaud.com
More information about the pmwiki-users