首页 > Other > ZEN CART 如何添加自定义页面

ZEN CART 如何添加自定义页面

按照下面的路径,添加自己的文件,就OK了

以about us页面为例, 默认模板

\includes\templates\template_default\templates\tpl_about_us_default.php
\includes\languages\english\about_us.php
\includes\languages\english\html_includes\define_about_us.php
\includes\modules\pages\about_us\header_php.php

\includes\filenames.php

我们以About Us为例讲解一下zencart中如何新建页面!

1.在includes\languages\english\html_includes目录中新建文件define_about_us.php

这个文件是要显示的内容,我们可以在后台 工具->页面编辑 中进行编辑。

2.在includes\templates\Your_template\templates目录中新建文件tpl_about_us_default.php
并在此文件中增加如下代码:

<?php
require($define_page);
?>

3.在includes\modules\pages目录中新建about_us目录

4.在新建的about_us目录中新建文件header_php.php,并在文件中增加如下代码:
<?php

require(DIR_WS_MODULES . zen_get_module_directory(‘require_languages.php’));
$breadcrumb->add(NAVBAR_TITLE);
$define_page = zen_get_file_directory(DIR_WS_LANGUAGES . $_SESSION[‘language’] . ‘/html_includes/’, FILENA

分类:Other
  1. 还没有评论。
  1. No trackbacks yet.

发表评论

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / 更改 )

Twitter picture

You are commenting using your Twitter account. Log Out / 更改 )

Facebook photo

You are commenting using your Facebook account. Log Out / 更改 )

Google+ photo

You are commenting using your Google+ account. Log Out / 更改 )

Connecting to %s

%d 博主赞过: