title: if an object property is another object, how do i access that object-property's property or method in smarty?
body: <pre><code>class A
  {
    public $property1;
    public $objB;
  
    public __construct(){
      $this-&gt;property1 = 'test';
      $this-&gt;objB = new B();
    }
  }
  
  class B
  {
    public $title;
    public __construct(){
      $this-&gt;title = 'title1';
    }
  
  }
  </code></pre>
  
  <p>so now i do this in the .php file</p>
  
  <pre><code>$a = new A();
  </code></pre>
  
  <p>in my .tpl i want to display $a->objB->title</p>
  
  <p>how do i do that? i tried </p>
  
  <pre><code>$smarty-&gt;assign('a', $a);
  </code></pre>
  
  <p>i cannot do this in smarty </p>
  
  <pre><code>{$a-&gt;objB-&gt;title}
  </code></pre>
  
  <p>i also tried </p>
  
  <pre><code>$smarty-&gt;register_object('a', $a);
  </code></pre>
  
  <p>i cannot do this in smarty </p>
  
  <pre><code>{a-&gt;objB-&gt;title}
  </code></pre>
  
  <p>OR</p>
  
  <pre><code>{$a-&gt;objB-&gt;title}
  </code></pre>
  
  <p>Please advise.</p>