[pmwiki-users] Data section edits (page headers/footers)

Pico Ben-Amotz pmwiki at ben-amotz.com
Thu Sep 20 22:21:05 CDT 2007


It would be nice to be able to place data -- such as hidden directive
page text variables -- in a section or chunk of a page that would not
appear when viewed using a (modified) editing template.

The idea is to allow novice editors to be spared from having to view
the underlying hidden PTV data generated by input forms (or PmForm,
FOX, etc) when editing a page, while still  storing that data in a
portion of the page that is accessible to pagelists.  This can avoid
the need to create secondary data pages, which can make pagelists more
complicated and slower to execute.

If the section or chunk were located at the very start (top) or end
(bottom) of a page, authors might think of it as virtual page header
or page footer and recipes could direct data by posting it to the top
or bottom.

Examples of code to do this could probably be found in a very small
subset of the SectionEdit recipe, which uses pre-chunks and
post-chunks and a modified editing template to select  or exclude a
portion of the page for editing.

Right now, I can get SectionEdit to pretty much approximate the
behavior I am looking for by turning off the section edit links for
headings, placing hidden PTV directives at the top of a page followed
by a heading, and modifying the edit links to append the following
string: &s=1&auto=y  The result is that clicking the edit link opens
the page starting with the heading at the top.  But then when changes
are saved, the browser navigates away from the page based on the
string that is posted to the url.  Moreover, if there is a second
heading on the page, the editing screen does not show the rest of the
content.  Clearly the SectionEdit code is overkill for the limited
functions that I am trying to achieve.

Is there already something out there that is a closer fit than
SectionEdit?  If not, is does the SectionEdit recipe provide the basic
model that could be scaled down to its essential core?  Any
suggestions or comments?  (Anyone interested in taking this on?)

Pico



More information about the pmwiki-users mailing list