methods calling methods --- fatal error

From: Date: Mon, 17 Feb 2003 20:02:14 +0000
Subject: methods calling methods --- fatal error
Groups: php.smarty.general 
Request: Send a blank email to php-smarty-general+get-7805@lists.php.net to get a copy of this message
I need to call a method from a method, and it seems I can't do it directly (ex. $object->method()->method() ) in a template First I tried: {foreach from=$user->getGroup() item=group} In {$group->getTitle()} you are a: {$user->getCurrentRole($group)->getTitle()}<br/> {/foreach} this returns a syntax error then I tried: {foreach from=$user->getGroup() item=group} In {$group->getTitle()} you are a: {foreach from=$user->getCurrentRole($group) item=role} {$role->getTitle()} {/foreach} <br/> {/foreach} this returns a Fatal error: Call to a member function on a non-object so then i tried: {foreach from=$user->getGroup() item=group} In {$group->getTitle()} you are a: {$user->getCurrentRole p1=$group assign="role"} {$role->getTitle()} <br/> {/foreach} this then also returns a Fatal error: Call to a member function on a non-object Has anyone come across this problem? Or am I just loosing my mind? Although, I must say the new object support is making my life soooooo much easier! THANKS! ____________________________________________ Andrew S. Nagy Lead Applications Developer Living SchoolBook Syracuse University (315) 443-3450 http://lsb.syr.edu

« previous php.smarty.general (#7805) next »