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

Hans design5 at softflow.co.uk
Tue Nov 13 08:56:36 CST 2007

Tuesday, November 13, 2007, 2:39:38 PM, Patrick R. Michaud wrote:

> Actually, (:input textarea:) *can* handle multiline input, at
> least from page text variables.
> For example, to load the contents of $:XYZ from a page into a
> textarea, one can use:
>     (:input defaults source=Group.Page:)
>     (:input textarea name=$:XYZ :)
> The (:input defaults source=...:) line grabs all of the PTVs
> from Group.Page and uses them as the default values for any
> input controls of the same name.  

I tried it before and failed, but i will again. Maybe I fell foul by
giving it  a curly bracket. Or the trick with name=$:XYZ

But it seems a bit strange to give the control a different name each
for each different PTV loading. I usually named it 'text' and gave it
an id=text as well, to provide  a hook for guieditbuttons.
Maybe the id=text is enough and it does not matter what the name is.
I need to test this.

> It sounds like it might work... but I'll have to think about it 
> a bit to see what we might be overlooking.  It could have some
> negative impacts on the backend, where we wouldn't have any clear
> indication that $:anchor was intended to be delimited with [[#anchor]]
> and not (:anchor: ... :).

if you provide me with  a pattern for the ptv, I will test it.

text content

eqivalent to

text content

either have  [[#sectionend]] stipulated, or just use the next [[#..
anchor as ending.

This approach means we are not using the nice TextSection function.

Another approach me be to use TextSection() for anchored sections, and
PageTextVariable() to grab a PTV.

TextSection() is really good in helping to get a template section.
PageTextVariable() is not nice if the PTV does not exist, or th epath
is incorrect.


More information about the pmwiki-users mailing list