If the extension is .phtml
you are using the PHP template engine.
You will have to change your DI view config to include the Volt engine. Volt and PHP engines can be used side by side and will workout which to use based on the extension.
https://docs.phalconphp.com/en/latest/reference/volt.html
<?php
use Phalcon\Mvc\View;
// Registering Volt as template engine
$di->set(
'view',
function () {
$view = new View();
$view->setViewsDir('../app/views/');
$view->registerEngines(
array(
".phtml" => 'Phalcon\Mvc\View\Engine\Php',
".volt" => 'Phalcon\Mvc\View\Engine\Volt'
)
);
return $view;
}
);