模板中传递给块函数的属性都包含在params参数数组中 4. content的值,取决于函数在执行开始标签还是结束标签。...每将
结合例子的进一步说明
example 1
block.my_test.php
function smarty_block_my_test($params, $content, $smarty, &...block.my_test.php
function smarty_block_my_test($params, $content, $smarty, &$repeat){
$count = $...block.html_link.php
function smarty_block_html_link($params, $content, $smarty, &$repeat){
if(!...使用addPluginsDir(), 将插件(block.html_link.php)所在的目录告知smarty。此种方式要注意文件名和函数的命名。