NemoPS Posted October 27, 2011 Share Posted October 27, 2011 Hi, i've noticed there is a variable called "$page_name" in the code of the top navigation menu, but this variable (global) is empty everywhere. Is this something planned for the next prestashop version? Or is $page_name set somewhere, like in frontcontroller or so? 1 Link to comment Share on other sites More sharing options...
justinl Posted November 11, 2011 Share Posted November 11, 2011 It is set in the FrontController and is also available to be assigned to any controller extending the FrontController. Usually it's set like this in your php class variable section: public $php_self = 'whatever_page_name_you_want.php'; Link to comment Share on other sites More sharing options...
NemoPS Posted November 17, 2011 Author Share Posted November 17, 2011 Uhm, ok, so i found it in the frontcontroller, but it's not available overall (not in modules at least), so was it just an error it was placed as global in the top navigation? Link to comment Share on other sites More sharing options...
RoooM Posted August 14, 2012 Share Posted August 14, 2012 how to get the title category, where the id = 5 Thanks Link to comment Share on other sites More sharing options...
Dh42 Posted August 14, 2012 Share Posted August 14, 2012 It has been around for a while now. I use a lot of times to load stylesheets and other things I might only need on the index page. {if $page_name == 'index'} <script type="text/javascript"> var yiw_prettyphoto_style = 'pp_default'; </script> {else} {/if} Like this. Link to comment Share on other sites More sharing options...
Recommended Posts