Zen Cart Logo
Forums / General Questions / require page in defined pages

require page in defined pages

Views: 563

Results 1 to 4 of 4
9 Apr 2011, 9:17 AM
#1
pizza392 avatar

pizza392

New Zenner

Join Date:
Mar 2011
Posts:
76
Plugin Contributions:
0

require page in defined pages

i add to page_2 the code below

<?php require($template->get_template_dir('/tpl_products_all_default.php',DIR_WS_TEMPLATE, $current_page_base,'templates'). '/tpl_products_all_default.php'); ?>
<?php require($template->get_template_dir('/tpl_modules_products_all_listing.php',DIR_WS_TEMPLATE, $current_page_base,'templates') . '/tpl_modules_products_all_listing.php'); ?>

when i visit the page_2, i get "sort by" and "More products will be added soon. Please check back later."

do you have any good idea to make it done? thanks

9 Apr 2011, 1:48 PM
#2
kobra avatar

kobra

Black Belt

Join Date:
Aug 2005
Location:
Arizona
Posts:
31,500
Plugin Contributions:
4

Re: require page in defined pages

define pages do not parse php code

9 Apr 2011, 2:45 PM
#3
ajeh avatar

ajeh

Oba-san

Join Date:
Sep 2003
Location:
Ohio
Posts:
62,757
Plugin Contributions:
1

Re: require page in defined pages

Actually, Page 2 could take the php code if the code from the /pages/products_all/header_php.php were included so that it had data to display ...

The language file defines would also have to be added from the products_all to the page_2 defines ...

However, in the Page two define, just use the:

<?php require($template->get_template_dir('/tpl_products_all_default.php',DIR_WS_TEMPLATE, $current_page_base,'templates'). '/tpl_products_all_default.php'); ?>
10 Apr 2011, 7:15 AM
#4
pizza392 avatar

pizza392

New Zenner

Join Date:
Mar 2011
Posts:
76
Plugin Contributions:
0

Re: require page in defined pages

it works great
thank you