[pmwiki-users] Checking if a {$$var} is set

Randy Brown randy at brownragfilms.com
Wed Feb 4 09:55:31 CST 2009


I too would like the default to be that the $$var disappears if not  
provided. That way I could pass only the variables I need (for example  
in includes).

Could there be a markup that signifies that missing variables should  
be shown. Perhaps {$$$var} if you want the variable to appear if  
missing? That seems more flexible than defining a page as a template  
page and requiring that all variables behave the same way.

Randy

On Feb 4, 2009, at 9:38 AM, Hans wrote:

> Wednesday, February 4, 2009, 2:46:57 PM, Patrick R. Michaud wrote:
>
>> There's not currently a 'built-in' way.  I've been musing
>> that unset variables should probably evaluate to '' instead
>> of remaining in the markup.
>
> That would be good in normal displayed content, but in template pages
> I find it very useful to see the {$$var} as a placeholder, i.e. to
> see a rendered template with {$$var} being shown as placeholder, not
> just to see it in the source. - I am talking about display templates
> here, not pagelist templates.




More information about the pmwiki-users mailing list