[pmwiki-devel] page text variables in edit form?

Crisses crisses at kinhost.org
Thu Nov 2 19:10:04 CST 2006


On Nov 2, 2006, at 6:28 PM, Ben Stallings wrote:

> I'm making some encouraging progress on the DataQuery recipe, and
> learning a lot in the process!  But I've run into a question that I
> believe goes off the map of the existing documentation.  I'm pretty  
> sure
> Caveman and Crisses have already discussed this, but there's been so
> much talk about page text variables here on the list I haven't been  
> able
> to follow it and don't know where to start looking in the archives, so
> bear with me please...
>
> To encourage data integrity, the DataQuery recipe generates a
> $Group/EditForm page based on the structure of the database table
> assigned to that group.  When you edit a page in the group, it uses  
> this
> page as its EditForm unless told not to.  The form has a separate form
> field for each of the page text variables (i.e. database fields) in  
> the
> page being edited.
>
> The tricky part is getting these page text variables to appear in the
> form, since they're on another page.  I'm using the {*$:varname}  
> syntax
> as suggested for headers and footers, but it doesn't seem to work in
> this case.  (Yes, I'm using the most recent beta.)
>
> Is there something about ?action=edit that prevents the parsing of  
> page
> text variables?  Or am I just doing it wrong?  Thanks in advance!   
> --Ben S.

Ok -- to learn a LOT about how page text vars behave, you could look at

http://similepedia.com/index.php/Site/LocalTemplates

There is a LOT of page text var play there.  Enough to write a  
dissertation on ;)

I think that you want Group/PageName{$var}.  If you're getting Group/ 
PageName from a variable (which is what I'm doing a lot on Site/ 
LocalTemplates noted above) then the syntax is {{{$Group}/{$PageName}} 
{$var}} I think.  I haven't tried that one.

{*$var} is for use in included pages.
on Group/GroupHeader for example, you would use the {*$var} format to  
use the page variable $var of the DISPLAYED page.  Otherwise {$var}  
would be the $var value from the Group/GroupHeader page.

Did that help?

Crisses





More information about the pmwiki-devel mailing list