class A
{
public $property1;
public $objB;
public __construct(){
$this->property1 = 'test';
$this->objB = new B();
}
}
class B
{
public $title;
public __construct(){
$this->title = 'title1';
}
}
so now i do this in the .php file
$a = new A();
in my .tpl i want to display $a->objB->title
how do i do that? i tried
$smarty->assign('a', $a);
i cannot do this in smarty
{$a->objB->title}
i also tried
$smarty->register_object('a', $a);
i cannot do this in smarty
{a->objB->title}
OR
{$a->objB->title}
Please advise.