7 、模板文件 help.dwt <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <!-- TemplateBeginEditable name="doctitle" --> <title>{$page_title}</title> <!-- TemplateEndEditable --><!-- TemplateBeginEditable name="head" --><!-- TemplateEndEditable --> <meta name="Keywords" content="{$keywords}" /> <meta name="Description" content="{$description}" /> <link rel="shortcut icon" href="favicon.ico" /> <link rel="icon" href="animated_favicon.gif" type="image/gif" /> <link href="{$ecs_css_path}" rel="stylesheet" type="text/css" /> </head> <body> <!-- #BeginLibraryItem "/library/page_header.lbi" --><!-- #EndLibraryItem --> <div class="AreaR"> <!-- 焦点图和站内快讯 START--> <div class="box clearfix"> <div class="box_1 clearfix"> <div class="f_l" id="focus"> <!-- #BeginLibraryItem "/library/index_ad.lbi" --><!-- #EndLibraryItem --> </div> <!--news--> <div id="mallNews" class="f_r"> <div class="NewsTit"></div> <div class="NewsList tc"> <!-- TemplateBeginEditable name=" 站内快讯上广告位 " --> <!-- #BeginLibraryItem "/library/cat_goods.lbi" --><!-- #EndLibraryItem --> <!-- TemplateEndEditable --> <!-- #BeginLibraryItem "/library/new_articles.lbi" --><!-- #EndLibraryItem --> </div> </div> <!--news end--> </div> </div> <!-- #BeginLibraryItem "/library/page_footer.lbi" --><!-- #EndLibraryItem --> </body> </html> 红色背景部分是可编辑区域,如下图 8 、 help.dwt <?php define('IN_ECS', true); require(dirname(__FILE__) . '/includes/init.php'); assign_template('c', array($cat_id)); $position= assign_ur_here(0, 'asdfasdfaadsfasd'); $smarty->assign('ur_here', $position['ur_here']); // 当前位置 $smarty->display('help.dwt'); ?> 9 、最终效果 (责任编辑:最模板) |