You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The controller providers a view helper to assign variables to template. You don't need to know what a view helper is.
class Demo_IndexController extends Xoops_Zend_Controller_Action
{
publicfunctionindexAction()
{
$data = 'Welcome to Xoops!';
$this->template->assign('aString', $data);
}
}
Then, you can use a variable named as aString in the template.
Where are the template files
All the template files are put at the directory templates under the application root. The file name is composed as {Controller}_{action}.html .
using smarty
The template will be compiled by the smary engine. The delimiters using by Xoops Engine is <{ and }>. So, continue the example above, here is the code in the template: