Forums / Templates, Stylesheets, Page Layout / New pages not showing correctly

New pages not showing correctly

Views: 681

Results 1 to 3 of 3
6 Mar 2012, 7:46 PM
#1
brianm avatar

brianm

New Zenner

Join Date:
Mar 2012
Posts:
2
Plugin Contributions:
0

New pages not showing correctly

Being relatively new to customizing ZenCart I am having an issue trying to add new pages to my site.

I have about 5 new pages I am trying to add without total success. I have followed several of the threads on various sites and I have also tried the "Define Page Generator" and I keep getting the same problem.

At the bottom of my page (footer) where I list all of my links I get "BOX_INFORMATION_{page_name}" instead of the actual page name defined.

Thoughts?

7 Mar 2012, 11:23 AM
#2
stevesh avatar

stevesh

Black Belt

Join Date:
Feb 2005
Location:
Lansing, Michigan USA
Posts:
19,793
Plugin Contributions:
2

Re: New pages not showing correctly

That means that page name isn't, in fact, defined. What file did you place the define in and what exactly does it say ?

7 Mar 2012, 4:47 PM
#3
brianm avatar

brianm

New Zenner

Join Date:
Mar 2012
Posts:
2
Plugin Contributions:
0

Re: New pages not showing correctly

Thanks for the reply.

Under the extra_datafiles I created a file named {pagename}.php and contains the following:

<?php
/**
* @package Pages
* @copyright Copyright 2003-2006 Zen Cart Development Team
* @copyright Portions Copyright 2003 osCommerce
* @license http://www.zen-cart.com/license/2_0.txt GNU Public License V2.0
*/

// DEFINTELY DON'T EDIT THIS FILE UNLESS YOU KNOW WHAT YOU ARE DOING!

// {pagename} Filename Defines
define('FILENAME_{pagename}', '{pagename}');
define('FILENAME_DEFINE_{pagename}', '{pagename}');
?>

Now if I add

define('BOX_INFORMATION_{pagename}', '{page title');

Then it starts to work but this information is in the file under the 'languages/english/extra_datafiles/{templatename}/{pagename}.php.

It just seems that zencart is picking up only the first file mentioned and not the other files.

Here is my full deployment scheme:

includes/extra_datafiles/{pagename}.php

<?php
/**
* @package Pages
* @copyright Copyright 2003-2006 Zen Cart Development Team
* @copyright Portions Copyright 2003 osCommerce
* @license http://www.zen-cart.com/license/2_0.txt GNU Public License V2.0
*/

// DEFINTELY DON'T EDIT THIS FILE UNLESS YOU KNOW WHAT YOU ARE DOING!

// {pagename} Filename Defines
define('FILENAME_{pagename}', '{pagename}');
define('FILENAME_DEFINE_{pagename}', '{pagename}');
?>

includes/languages/{language}/{templatename}/{pagename}.php

<?php
/**
* @package languageDefines
* @copyright Copyright 2003-2006 Zen Cart Development Team
* @copyright Portions Copyright 2003 osCommerce
* @license http://www.zen-cart.com/license/2_0.txt GNU Public License V2.0
*/

// DON'T EDIT THIS FILE UNLESS YOU KNOW WHAT YOU ARE DOING!

// This is used to display the heading and the navigation bar
	define('NAVBAR_TITLE', '{Navigational Bar Title}');
	define('HEADING_TITLE', '{Page Heading Title}');
?>

includes/languages/{language}/extra_definitions/{templatename}/{pagename}.php

<?php
/**
* @package languageDefines
* @copyright Copyright 2003-2006 Zen Cart Development Team
* @copyright Portions Copyright 2003 osCommerce
* @license http://www.zen-cart.com/license/2_0.txt GNU Public License V2.0
*/

// DON'T EDIT THIS FILE UNLESS YOU KNOW WHAT YOU ARE DOING!

// This is used to display the text link in the 'information' or other sideboxes
define('BOX_INFORMATION_{pagename}', '{page title}');
?>

includes/languages/{language}/html_includes/define_{pagename}.php

{File initially empty}

includes/languages/{language}/html_includes/{templatename}/define_{pagename}.php

{File initially empty}

includes/modules/pages/{pagename}/header_php.php

<?php
/**
* @package page
* @copyright Copyright 2003-2006 Zen Cart Development Team
* @copyright Portions Copyright 2003 osCommerce
* @license http://www.zen-cart.com/license/2_0.txt GNU Public License V2.0
*/

// DEFINTELY DON'T EDIT THIS FILE UNLESS YOU KNOW WHAT YOU ARE DOING!

$_SESSION['navigation']->remove_current_page();
require(DIR_WS_MODULES . zen_get_module_directory('require_languages.php'));

// include template specific file name defines
$define_page = zen_get_file_directory(DIR_WS_LANGUAGES . $_SESSION['language'] . '/html_includes/', FILENAME_DEFINE_{pagename}, 'false');

$breadcrumb->add(NAVBAR_TITLE);
?>

includes/templates/{templatename}/template/tpl_{pagename}_default.php

<?php
/**
* @package page template
* @copyright Copyright 2003-2006 Zen Cart Development Team
* @copyright Portions Copyright 2003 osCommerce
* @license http://www.zen-cart.com/license/2_0.txt GNU Public License V2.0
*/

// THIS FILE IS SAFE TO EDIT! This is the template page for your new page 

?>
<!-- bof tpl_{pagename}_default.php -->
	<div class='centerColumn' id='{pagename}'>
		<h1 id='{pagename}-heading'><?php echo HEADING_TITLE; ?></h1>
		<div id='{pagename}-content' class='content'>
		<?php
		/**
		* require the html_define for the {pagename} page
		*/
		require($define_page);
		?>
		</div>
	</div>
<!-- eof tpl_las_aboutus_default.php -->