| CSHOP模版系统Assign和Include模版标签介绍,assign 用于在模板被执行时为模板变量赋值,Include 标签用于在当前模板中包含其它模板. 当前模板中的变量在被包含的模板中可用。 必须指定 file 属性,该属性指明模板资源的位置。如果设置了 assign 属性,该属性对应的变量名用于保存待包含模板的输出,这样待包含模板的输出就不会直接显示了。 Assign
 描述: assign 用于在模板被执行时为模板变量赋值. 例子: 
{assign var="name" value="Bob"}输出: The value of $name is Bob. Include
 描述: Include 标签用于在当前模板中包含其它模板. 当前模板中的变量在被包含的模板中可用。必须指定 file 属性,该属性指明模板资源的位置。 如果设置了 assign 属性,该属性对应的变量名用于保存待包含模板的输出,这样待包含模板的输出就不会直接显示了。 例子1: 
{include file="header.tpl"}
{* body of template goes here *}
{include file="footer.tpl"}可以在属性中传递参数给待包含模板. 传递给待包含模板的参数只在待包含模板中可见. 如果传递的参数在待包含模板中有同名变量,那么该变量被传递的参数替代。 例子2: 
{include file="header.tpl" title="Main Menu" table_bgcolor="#c0c0c0"}
{* body of template goes here *}
{include file="footer.tpl" logo="http://my.domain.com/logo.gif"}包含 $template_dir 文件夹之外的模板请使用 模板资源 说明的格式. 例子3: 
{* absolute filepath *}
{include file="/usr/local/include/templates/header.tpl"}
{* absolute filepath (same thing) *}
{include file="file:/usr/local/include/templates/header.tpl"}
{* windows absolute filepath (MUST use "file:" prefix) *}
{include file="file:C:/www/pub/templates/header.tpl"}
{* include from template resource named "db" *}
{include file="db:header.tpl"}(责任编辑:最模板) | 



 绿色保健品仿薄荷ecshop模
							人气:787
							绿色保健品仿薄荷ecshop模
							人气:787
						 YourStore外贸英文时尚服饰
							人气:261
							YourStore外贸英文时尚服饰
							人气:261
						 ecshop 商品详细页 快速订购
							人气:1998
							ecshop 商品详细页 快速订购
							人气:1998
						 酒美网模板之shopex免费模
							人气:3505
							酒美网模板之shopex免费模
							人气:3505
						 红孩子ecshop模板
							人气:578
							红孩子ecshop模板
							人气:578
						 Varmo英文综合商品商城Ma
							人气:134
							Varmo英文综合商品商城Ma
							人气:134