[pmwiki-users] PmForm to create new pages

DaveG pmwiki at solidgone.com
Mon May 18 21:43:51 CDT 2009


Oliver Betz wrote:
> "$Conditions['exists']" is already defined in pmwiki.php, so your
> suggestion can be simplificated (no php needed):
> 
> (:template require if="!exists 'whatever variable'" errmsg="The page
> already exists!":)
Good call. If this works, that simplifies BlogIt -- cool.


>> In Site.ClogIt-CoreTemplate#blog-post-control I use this format:
>>   (:template defaults saveto="{$$ptv_entryurl}":)
>>
>> Where entryurl is the name of the PmForm variable in which the user 
>> enters the pagename.
> 
> Are you using (:input text $:entryurl:), IOW PTV markup for the target
> page?
> 
> I'm using (:input text newname:) and therefore get the same result (?)
> by $$something (without ptv_ prefix).
Interesting -- I seem to recall thinking you *had* to use a PTV as the 
form variable, and also wondering *why* I had to use the ptv_ prefix on 
the template. I'll have to see if my use of the PTV has had any 
unintended (possibly useful!) side-affects.



More information about the pmwiki-users mailing list