Cant output model data on template
Notice: This thread is very old.
- jkeod
- Member | 2
What im doing wrong ?
I having problems to output model data on template, the model class is set, has
the method and the method returns non empty string.
When i put literal inside my template instead of {$model->getPageTitle()} it
works fine.
Im trying to follow the example when code refer variable directly like that:
<p>{$item}</p>
The way i coded dont make latte find the object and throw the following
error:
Call to a member function getPageTitle() on null
The generated code is :
My template:
My layout:
- Filip Procházka
- Moderator | 4668
I think it should be
You have to name the parameters that are passed to the template.