[pmwiki-users] Equivalent of $LastModified for each Heading section in a page?

Hans Bracker design at softflow.co.uk
Sat Mar 23 09:50:06 CDT 2013


> Is there an equivalent of $LastModified for each Heading section in
> a page? I have multiple Headings in one page, for example:
>
> !! Overview
> !! Resources
> !! Training
>
> and would like to display a last-modified date for each section.
> Didn't find anything in the docs, but it appears that the individual
> sections should be referenceable, since they each have an 'Edit Section' capability.


PmWiki has a number of built-in PageVariables, and other page-specific variables can be
defined. But it has no section-specific variables. It should be possible to set inside
the page text PageTextVariables which are section-specific, and which could carry the
date and time when a specific section was last edited. The Edit Form used for editing
page sections would need to set/update the value for these. If you use PageTextVariables
in a hidden format, for instance
   (:Overview-lastmodified: 23/03/13 15:45 :)
you then could display the value anywhere in the page with
   {$:Overview-lastmodified}

The tricky part is to get the form you use for editing the sections
to update such PTVs. I know that using Fox for section edits it could
be done, but if you use the SectionEdit recipe I do not know how this
could be achieved.

Alternatively you could break your page into a number of subpages, one
for each section, and create these as ordinary wiki pages, then using
(:include <subpagename>:) markup to include these in your page, as
sections. Then you have the possibility of using {$LastModified} from
each subpage. You would not do section edits then, but edit of
subpages. - But one problem with this approach would be how to
display the page and not just the subpage after each subpage edit.
Other problems are related to pagelists and searches.


Best regards,
 Hans                         
mailto:design at softflow.co.uk
www.softflow.co.uk




More information about the pmwiki-users mailing list