以新建FAQ页面为例:
一、使用EZ-Pages新建
只需要到zencart后台—tools-EZ-Pages—new file按提示填写相应信息
链接形式如:
http://www.myDOMain.com/index.php?main_page=page&id=2
使用最新ultimate_seo_urls插件seo伪静态插件后
http://www.mydomain.com/faq-ezp-2.html
二、新建PHP文件实现
1.在includeslanguagesenglishhtml_includes目录中新建文件define_faq.php
2.在includeslanguagesenglish目录中新建文件faq.php,内容
2 |
define( 'NAVBAR_TITLE' , 'FAQ' );
|
3 |
define( 'HEADING_TITLE' , 'FAQ' );
|
3.在includestemplatesYOUR_TEMPLATEtemplates目录中新建文件 tpl_faq_default.php
并在此文件中增加如下代码:
1 |
<div class = "centerColumn" id= "faq" >
|
2 |
<h1 id= "faqHeading" ><?php echo HEADING_TITLE; ?></h1>
|
4 |
<div id= "faqMainContent" class = "content" >
|
9 |
<div class = "buttonRow back" ><?php echo zen_back_link() . zen_image_button(BUTTON_IMAGE_BACK, BUTTON_BACK_ALT) . '</a>' ; ?></div>
|
4.在includesmodulespages目录中新建faq目录,在新建的faq目录中新建文件header.php,并在文件中增加如下代码:
2 |
require (DIR_WS_MODULES . zen_get_module_directory( 'require_languages.php' ));
|
3 |
$define_page = zen_get_file_directory(DIR_WS_LANGUAGES . $_SESSION [ 'language' ] . '/html_includes/' , FILENAME_DEFINE_FAQ, 'false' );
|
4 |
$breadcrumb ->add(NAVBAR_TITLE);
|
5.在includesextra_datafiles新建faq_filenames.php,增加代码:
2 |
define( 'FILENAME_FAQ' , 'faq' );
|
3 |
define( 'FILENAME_DEFINE_FAQ' , 'define_faq' );
|
6.(可选)要在Information增加faq链接
6.1在includeslanguagesenglishextra_definitions新建faq.php,内容如下
2 |
define( 'BOX_INFORMATION_FAQ' , 'FAQ' );
|
6.2 在includesmodulessideboxesinformation.php中适当位置增加
1 |
if (DEFINE_ABOUT_US_STATUS <= 1) {
|
2 |
$information [] = '<a href="' . zen_href_link(FILENAME_FAQ) . '">' . BOX_INFORMATION_FAQ . '</a>' ;
|
7.(可选)在sitemap页增加faq链接
7.1 同样必须6.1中的文件。
7.2 在includestemplatesYOUR_TEMPLATEtemplatestpl_site_map_default.php适当位置增加
1 |
<?php if (DEFINE_FAQ_STATUS <= '1' ) { ?>
|
2 |
<li><?php echo '<a href="' . zen_href_link(FILENAME_FAQ) . '">' . BOX_INFORMATION_FAQ . '</a>' ; ?></li>
|
链接形式如:
http://www.mydomain.com/index.php?main_page=faq
使用最新ultimate_seo_urls插件seo伪静态插件后
http://www.mydomain.com/faq.html