php - Smarty 3 Exit Tag -


in smarty 3 using

1 - {break} break; continue; keyword

2- {continue} used continue; keyword have written custom plugin exit tag same break

<?php     /*     *   modified exit tag     */      function smarty_compiler_exit( $contents, &$smarty ) {        return 'exit;';     } ?> 

but when use {exit} gives output :- exit; not working php exit keyword

why not use return?

compiler.return.php

 <?php      function smarty_compiler_return($tag_arg, &$smarty) {      return "<?php return;?>";      }      ?> 

so when call {return} within tpl, returns flow php.


Comments

Popular posts from this blog

java - nested exception is org.hibernate.exception.SQLGrammarException: could not extract ResultSet Hibernate+SpringMVC -

sql - Postgresql tables exists, but getting "relation does not exist" when querying -

asp.net mvc - breakpoint on javascript in CSHTML? -