aztecmedia Posted October 28, 2011 Share Posted October 28, 2011 Hi - I'm developing a new site in Prestashop and am using several modules including 'Image Gallery' and 'Prestapress'. For some reason when you go to view the front end pages for these modules (so /gallery and /articles) the page's BODY tag is missing the ID which is generally automatically generated (as is the case on other installations with these modules). Any ideas on what might be causing the BODY ID to disappear? I'm running version 1.4.4.1. EDIT: Having looked at some of the code, the tag being used successfully in other places is $page_name. This variable is setup in FrontController.php: $page_name = (isset($this->php_self) ? preg_replace('/\.php$/', '', $this->php_self) : ''); It seems that for whatever reason on this install and for these modules, it can't find the .php page name to use. I have no idea whether this is something to do with .htaccess or what quite. Thank you! EDIT: I contacted one of the module producers and they provided this line of code to fix the issue. Add it to the main module .php file above the line that includes the header.php file - it might look like this: include(dirname(__FILE__).'/../../header.php'); And above it add the following: $pathinfo = pathinfo(__FILE__);$page_name = basename($_SERVER['PHP_SELF'], '.'.$pathinfo['extension']);$page_name = (preg_match('/^[0-9]/', $page_name)) ? 'page_'.$page_name : $page_name;$smarty->assign('page_name', $page_name); Olly 1 Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now