对于zen-cart模板,原文件中保留有page_2.php, page_3.php 和 page_4.php三个文件方便自己定义页面.个人建议先是在这三个文件的基础上改, 出于seo url考虑, 需要把以下相应地方的地方作修改:
includes/filenames.php
define('FILENAME_DEFINE_PAGE_2', 'define_page_2');
define('FILENAME_DEFINE_PAGE_3', 'define_page_3');
define('FILENAME_DEFINE_PAGE_4', 'define_page_4');
includes/languages/YOUR_TEMPLATE/english.php
define('BOX_INFORMATION_PAGE_2', 'Page 3');
define('BOX_INFORMATION_PAGE_3', 'Page 3');
define('BOX_INFORMATION_PAGE_4', 'Page 4');
includes/languages/english/
page_2.php page_3.php page_4.php中的NAVBAR_TITLE, HEADING_TITLE, TEXT_INFORMATION
includes/languages/english/html_includes/
page_2.php page_3.php page_4.php 这里定义里面的内容.
最后创建模板文件,复制到
includes/languages/YOUR_TEMPLATE/templates/tpl_YOURNMAE_default.php
如果上面三个文件已经修改,还想创建新页面,过程如下(以创建Link Resource文文件为例):
1.在includes/filenames.php中,
define('FILENAME_DEFINE_LINKS', 'links'); //added by thisuc 2010-07-15
2.在includes/languages/YOUR_TEMPLATE/english.php中,
define('BOX_INFORMATION_LINKS', 'Link Resource'); //added by thisuc 2010-07-15
3.复制includes/modules/pages/中page_4文件,重命名为links, 修改里面的header.php中$define_page为:
$define_page = zen_get_file_directory(DIR_WS_LANGUAGES . $_SESSION['language'] . '/html_includes/', FILENAME_DEFINE_LINKS, 'false');
3.复制includes/modules/pages/page_4.php,重命名为links.php,并修改为:
define('NAVBAR_TITLE', 'Link Resource');
define('HEADING_TITLE', 'Link Resource');
4.复制includes/languages/english/html_includes/page_4.php,重命名为links.php 并作相应的修改.
5.复制includes/languages/YOUR_TEMPLATE/templates/tpl_page_4_default.php,重命名为tpl_links_default.php
至此,新页面创建完毕.
后台设置:
设置是否可视:Configuration->Define Page Status
编辑页面内容:Tools->Define Pages Editor
(责任编辑:好模板) |