[pmwiki-users] Include other pages with variables

DaveG pmwiki at solidgone.com
Fri Nov 13 08:34:05 CST 2009


On 11/13/2009 2:10 AM, Simon wrote:
> PS My use case is
> (:if equal "{$$File}" "":)Photo(:else:){(ucfirst "{$$File}")}(:ifend:)
This also happens with other types of variable. I ended up creating a 
function to test, and calling with a conditional markup:
$Conditions['bi_isnull'] = 'bi_IsNull($condparm)==""';
function bi_IsNull($e){
   return (!empty($e) && substr($e,0,3)!='{*$' && substr($e,0,2)!='{$' 
&& substr($e,0,3)!='{=$' ?$e :'');
}

Called with:
  (:if bi_IsNull {$$File}:)Photo(:else:){(ucfirst "{$$File}")}(:ifend:)


  ~ ~ Dave



More information about the pmwiki-users mailing list