ecshop 标签使用 非常好的例子
在ECSHOP代码的history.lbi 中有下面的用法。
{insert name='history'} ,是用来显示浏览历史的。
跟踪代码后发现,控制语句是在 includes/lib_insert.php 文件。
这个文件是ECSHOP 动态内容函数库。
里面定义各个函数的格式都是 function insert_***() ,每个函数都是一个功能控制模块,
在模板中可以使用 {insert name=‘***’ } 的方法进行调用。

在lib_insert.php中看到有调用.
----------------
$str.='<ul class="clearfix"><li class="goodsimg"><a href="'http://www.ganshuw.com'" target="_blank"><img src="'.$goods['goods_thumb'].'" alt="'.$goods['goods_name'].'" class="B_blue" /></a></li><li style="width:115px;"><a href="http://www.jielala.com/" target="_blank" title="'.$goods['goods_name'].'"><font color=#515151>'.$goods['short_name'].'</a><br />'.$GLOBALS['_LANG']['shop_price'].'<font class="f1">'.$goods['shop_price'].'<br /></li></ul>';
------------
红色字是我加的,防破层断字。

详细地址: \includes\lib_insert.php

Insert 函数类似欲 inluce 函数,不同之处是 insert 所包含的内容不会被缓存,每次调用该模板都会重新执行该函数. 此函数 会在 当前页面自动查找 insert_cart_info函数! 如果当前页面没有该函数的话,会自动去插件目录中 查找 insert.cart_info.php文件中有无 smarty_insert_cart_info 函数!该函数 一般写 一些 连接数据库代码! 实现时时 更新! 类似函数还有   register_block!     例如你在页面上端使用一个带有广告条位置的模板,广告条可以包含任何HTML、图象、FLASH等混合信息. 因此这里不能使用一个静态的链接,同时我们也不希望该广告条被缓存. 这就需要在 insert 函数