2024年6月11日发(作者:)
------------------------------------------------------------------------------------------------------------------------------------------
zencart
模板系统文件笔记
1
:
html_
(zencart建站vip内部交流俱乐部--体验)
文件名:
html_
html_
文件隶属于:英文版zen-cart-v139h
文件路径:includestemplatestemplate_defaultcommon/
系统上隶属于:公共模板文件
主要功能:输出html页面的头部head标签的内容
主要包括:标题、meta信息[关键词、描述、...]、载入js、css等
/**
*CommonTemplate
*
*outputsthehtmlheader.i,e,everythingthatcomesbeforethetag
*
*@packagetemplateSystem
*@copyrightCopyright2003-2010ZenCartDevelopmentTeam
*@copyrightPortionsCopyright2003osCommerce
*@license/license/2_PublicLicenseV2.0
*@version$Id:html_157612010-03-3119:31:27Zdrbyte$
*/
/**
*loadthemoduleforgeneratingpagemeta-tags
*/
require(DIR_WS__get_module_directory('meta_'));//调用meta_
/**
*outputmainpageHEADtagandrelatedheaders/meta-tags,etc
*/
?>
"/TR/xhtml1/DTD/">
------------------------------------------------------------------------------------------------------------------------------------1
zencart模板系统文件笔记
------------------------------------------------------------------------------------------------------------------------------------------
eCommerce"/> in_array($current_page_base,explode(",",constant('ROBOTS_PAGES_TO_SKIP')))|| $current_page_base=='down_for_maintenance'||$robotsNoIndex===true){?> // 如定义 ROBOTS_PAGES_TO_SKIP, 页面维护检查,则 noindex,nofollow //快捷方式图标 HTTP__WS_CATALOG);?>"/> /**************************************************************************************** *载入css样式文件 ****************************************************************************************/ $directory_array=$template->get_template_part($template->get_template_dir('.css',DIR_WS_TEMPLATE, $current_page_base,'css'),'/^style/','.css'); while(list($key,$value)=each($directory_array)){ echo' $template->get_template_dir('.css',DIR_WS_TEMPLATE,$current_page_base,'css').'/'.$value.'"/>'."n"; } /** 给特定页面载入特定样式文件内容 */ $manufacturers_id=(isset($_GET['manufacturers_id']))?$_GET['manufacturers_id']:''; $tmp_products_id=(isset($_GET['products_id']))?(int)$_GET['products_id']:''; $tmp_pagename=($this_is_home_page)?'index_home':$current_page_base; if($current_page_base=='page'&&isset($ezpage_id))$tmp_pagename=$current_page_base. (int)$ezpage_id; $sheets_array=array('/'.$_SESSION['language'].'_stylesheet', '/'.$tmp_pagename, '/'.$_SESSION['language'].'_'.$tmp_pagename, '/c_'.$cPath, '/'.$_SESSION['language'].'_c_'.$cPath, ------------------------------------------------------------------------------------------------------------------------------------2 zencart模板系统文件笔记 ------------------------------------------------------------------------------------------------------------------------------------------ '/m_'.$manufacturers_id, '/'.$_SESSION['language'].'_m_'.(int)$manufacturers_id, '/p_'.$tmp_products_id, '/'.$_SESSION['language'].'_p_'.$tmp_products_id ); while(list($key,$value)=each($sheets_array)){ //echo"n"; $perpagefile=$template->get_template_dir('.css',DIR_WS_TEMPLATE,$current_page_base,'css'). $value.'.css'; if(file_exists($perpagefile))echo' } /** *载入打印css文件 */ $directory_array=$template->get_template_part($template->get_template_dir('.css',DIR_WS_TEMPLATE, $current_page_base,'css'),'/^print/','.css'); sort($directory_array); while(list($key,$value)=each($directory_array)){ echo' $template->get_template_dir('.css',DIR_WS_TEMPLATE,$current_page_base,'css').'/'.$value.'"/>'."n"; } /** *从你的模板上载入js文件 */ $directory_array=$template->get_template_part($template->get_template_dir('.js',DIR_WS_TEMPLATE, $current_page_base,'jscript'),'/^jscript_/','.js'); while(list($key,$value)=each($directory_array)){ echo' $current_page_base,'jscript').'/'.$value.'">'."n"; } /** **从你的模板上载入特定页面的js文件 */ $directory_array=$template->get_template_part($page_directory,'/^jscript_/','.js'); while(list($key,$value)=each($directory_array)){ echo' } /** *loadallsite-widejscript_*.phpfilesfromincludes/templates/YOURTEMPLATE/jscript,alphabetically */ ------------------------------------------------------------------------------------------------------------------------------------3 zencart模板系统文件笔记 ------------------------------------------------------------------------------------------------------------------------------------------ $directory_array=$template->get_template_part($template->get_template_dir('.php',DIR_WS_TEMPLATE, $current_page_base,'jscript'),'/^jscript_/','.php'); while(list($key,$value)=each($directory_array)){ /** *includecontentfromallsite-widejscript_*.phpfilesfromincludes/templates/YOURTEMPLATE/jscript, alphabetically. *escanbemanipulatedbyPHPwhenthey'recalled,andarecopiedin-fulltothebrowserpage */ require($template->get_template_dir('.php',DIR_WS_TEMPLATE,$current_page_base,'jscript').'/'.$value); echo"n"; } /** *includecontentfromallpage-specificjscript_*.phpfilesfromincludes/modules/pages/PAGENAME, alphabetically. */ $directory_array=$template->get_template_part($page_directory,'/^jscript_/'); while(list($key,$value)=each($directory_array)){ /** *includecontentfromallpage-specificjscript_*.phpfilesfromincludes/modules/pages/PAGENAME, alphabetically. *escanbemanipulatedbyPHPwhenthey'recalled,andarecopiedin-fulltothebrowserpage */ require($page_directory.'/'.$value);echo"n"; } //DEBUG:echo''; ?> 这是“外贸建站推广分享社区"zencart自主开发建站的系列免费体验教程,如你想自主建站,更深 入地了解zencart建站仿站和定制,欢迎你加入我们的vip内部交流俱乐部. 《 zencart模板系统文件笔记 》 是内部会员特权,只分享到第十篇 4------------------------------------------------------------------------------------------------------------------------------------ zencart模板系统文件笔记 ------------------------------------------------------------------------------------------------------------------------------------------ 更多内容请: ©2012陈金凌-外贸建站推广分享社区.版权所有. 欢迎传阅,请勿修改版权信息,谢谢合作! ------------------------------------------------------------------------------------------------------------------------------------5 zencart模板系统文件笔记
发布评论