how can remove php code blocks volt template file, has .phtml extension?
forexample:
<!-- must remove --> <h1><?=$tutorial?><h1> <!-- //remove area --> <!-- must stay --> <h1> {{tutorial}} </h1> <!-- //must stay -->
note: use phalcon's last version.
if extension .phtml
using php template engine.
you have change di view config include volt engine. volt , php engines can used side side , workout use based on extension.
https://docs.phalconphp.com/en/latest/reference/volt.html
<?php use phalcon\mvc\view; // registering volt 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; } );
Comments
Post a Comment