Controller code
public function indexAction()
{
$this->view->setLayout('mainlogin');
$this->view->setVar('test','hellWord');
}
View code in index.phtml:
<?php
echo $test;
?>
the wrong message:
Notice: Undefined variable: test in /data/wwwroot/shop/themes/views/backend/login/index.phtml on line 2
my php version is php 7,phalcon version is 2.1.