For Programmers: Free Programming Magazines  


Home > Archive > PHP Smarty Templates > August 2004 > Re: [SMARTY] $smarty and variables









You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

 

Author Re: [SMARTY] $smarty and variables
Monte Ohrt

2004-08-17, 3:59 pm

http://smarty.php.net/manual/en/api...mplate.vars.php

Marcus Bointon wrote:

>I'm writing a plugin that needs to check if a particular template variable
>is defined. I can't see anything in the docs to let me find that out - is
>there a public property like a $smarty.vars array that contains all the vars
>passed to a template?? I want to be able to do something like:
>
>If (array_key_exists('myvar', $smarty.vars)) {...
>
>Marcus
>
>

Marcus Bointon

2004-08-17, 3:59 pm

on 17/8/04 16:48, Monte Ohrt at monte@ispi.net wrote:

> http://smarty.php.net/manual/en/api...mplate.vars.php


Ah - it's a function, not a property. Thanks,

Marcus
--
Marcus Bointon
Synchromedia Limited: Putting you in the picture
marcus@synchromedia.co.uk | http://www.synchromedia.co.uk
Sponsored Links







Also available: Server administration forum archive | Web Design forum archive | Software forum archive | Hardware reviews archive

Copyright 2008 codecomments.com