Zen Cart Logo
Forums / Templates, Stylesheets, Page Layout / How to get only the content ($body_code) of the page without headers and sideboxes?

How to get only the content ($body_code) of the page without headers and sideboxes?

Locked

Views: 910

Results 1 to 2 of 2
This thread is locked. New replies are disabled.
20 Apr 2009, 12:42 AM
#1
chillout_buddha avatar

chillout_buddha

New Zenner

Join Date:
Jan 2006
Posts:
44
Plugin Contributions:
0

How to get only the content ($body_code) of the page without headers and sideboxes?

I am trying to implement ajax on my shop. I have all the working files but when I try to implement ajax on zencart, it shows the entire page with headers, footers and sideboxes. All I want for that particular page is the content of the $body_code variable. Does anyone know how to achieve this?

27 Apr 2009, 12:59 AM
#2
chillout_buddha avatar

chillout_buddha

New Zenner

Join Date:
Jan 2006
Posts:
44
Plugin Contributions:
0

Re: How to get only the content ($body_code) of the page without headers and sideboxes?

I found a solution for this. Not sure if this is the best way to do this. If you have a better way, share your views.

In includes/templates/YOURTEMPLATE/common/tpl_main_page.php, I modified the code like this:

if ($_REQUEST['main_page'] == "PAGENAME") { // added

$flag_disable_left = true;
$flag_disable_right = true;
$flag_disable_header = true;
$flag_disable_footer = true;
require($body_code);

} else {

    // your existing code

}