[pmwiki-users] new page attribute

Patrick R. Michaud pmichaud at pobox.com
Mon Sep 25 13:58:11 CDT 2006


On Mon, Sep 25, 2006 at 02:06:32PM -0400, Henrik Bechmann wrote:
> All,
> 
> I would like to add a page attribute named "summary", so that I can have 
> a text box for article summaries on my edit form, and so that I can 
> create a page variable for page summaries like this:
> 
> $FmtPV['$ArticleSummary'] = '$page["summary"]';

When page text variables are implemented (likely for pmwiki-2.2.0-beta2
or pmwiki-2.2.0-beta3), then you'll likely be able to do something like:

    (:Summary:Here is my text summary. It contains a whole paragraph 
    of text:)

and you can access it with {$:Summary}.  

I haven't decided if the directive form of text variables will
allow newlines in the value, but this would seem to argue in favor 
of it.

> This in turn would allow me to test for the presence of a summary for 
> inclusion in Site Map (ie pagelist) and rss output.

...and you can test for the presence of a summary by adding
"(:Summary:" as a search term to pagelist.

> PS I see (:title:) as being a few words, (:description:) as being a 
> sentence, and Summary as being a short paragraph.

Personally, I've always thought of (:description:) as encompassing 
short paragraphs.

Pm




More information about the pmwiki-users mailing list