[pmwiki-users] thoughts on PTVs, (:include:) and editing forms

Hans design5 at softflow.co.uk
Tue Nov 13 08:14:59 CST 2007

I am working on making  Fox capable of editing sections or parts of
a page, so for instance an edit link in a messag epost will open an
edit form with the message content for editing, and saving it will
replace the content with the new one.

I discovered that I need a very different approach to handle the
editing of content within a PTV, than content within a section marked
with anchors. And I like to see a way to combine these two.

AFAIK we can include page sections using (:include PageName#section:),
and a multiline PTV with {PageName$:ptv}

But to grab such a page part to put into a textarea field needs two
different ways (and (:input textarea:) cannot handle multi-line input at
present, so I am using (:textarea).....(:textareaend:) markup)

I can load the PTV section into the edit textarea by putting the
variable after the (:textarea:) markup. But I cannot do the same with
a PageName#section. (:include ..:) does not help here. Instead I have
to use in php the TextSection() function to grab the anchored section,
then assign it to $InputValues['text'], the name of the textarea.

Quite a different process, and needing a different edit form in each
case. Why does it need to be so different? Is there a better route?
After all, in one case the content is enclosed with ptv markup, in the
other with anchor links. Can I treat anchor links as PTVs, can I
define a PTV pattern which would use content from one anchor up to the


More information about the pmwiki-users mailing list