You are here: nesting object calls in template « Smarty Templates Posts « IT news, forums, messages
nesting object calls in template

Posted by Justin Francis on 09/09/05 19:59

I am trying to nest object calls in the template. For example:

{{$obj->getA()->getB()}}
{{foreach from=$obj->getA() item=item}}

The former yields "unknown tag" and the latter translates the "from"
argument into $obj."->getA()". I looked in the Smart_Compiler.class code
and found that it is explicitly designed so that only one level of
object method calls can me made.

Is there a workaround for this? Can anyone shed light on why this was
implemented this way?

Justin Francis

 

Navigation:

[Reply to this message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация