hi, I'd like to expose a variable (the name of the model used by a
module) from the action to the template so that I just have to define
it once for the whole class.
If I do
[code]
class openmodelActions extends sfActions
{
public $modelName='OpenModel';
public function executeIndex(sfWebRequest $request)
{
$this->mName=$this->modelName;
$this->categories = Doctrine::getTable('Category')
->getWithBubbles($this->modelName);
}
}
[/code]
and <?php echo $mName;?> in the template it works. But if I don't do
$this->mName=$this->modelName;
in the execute index and call <?php echo $modelName;?> in the
template, I get a variable undefined warning.
any Ideas?
Tanks Marco
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"symfony users" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/symfony-users?hl=en
-~----------~----~----~----~------~----~------~--~---