prestashop_newuser Posted January 20, 2014 Share Posted January 20, 2014 Hi, I am developing a small module in prestashop. For that I want to get all the pages name. In my backend(module) there I will get all the pages name and in those pages I will show different text for different pages. For that when I searched, I got that all the pages name can be found from the controller name and that controller name can be used in smarty template file like {assign var='controllerName' value=$smarty.get.controller} {if $controllerName == 'cms'} <div>cms page</div>{/if} {if $controllerName == 'index'} <div>home page</div>{/if} {if $controllerName == 'category'} <div>Category Page</div>{/if} but here I am showing different contents according to the page controller name but I want to show all the pages names in the module backend. So how to do that? Any help and suggestions will be really appreciable. Thanks Link to comment Share on other sites More sharing options...
NemoPS Posted January 20, 2014 Share Posted January 20, 2014 I'm not sure I clearly understand your needs. Are you using a tpl file for the module's back office? Or the getContent method? Also, how are you retrieving all pages' data in the backend? Link to comment Share on other sites More sharing options...
prestashop_newuser Posted January 20, 2014 Author Share Posted January 20, 2014 I'm not sure I clearly understand your needs. Are you using a tpl file for the module's back office? Or the getContent method? Also, how are you retrieving all pages' data in the backend? I want to get all the pages in backend. I have not used any tpl file in backend. Above the codes that I have shown is in my frontend tpl file. But I really don't know how to get all the page names in backend? Link to comment Share on other sites More sharing options...
NemoPS Posted January 20, 2014 Share Posted January 20, 2014 Try with $controllers = Dispatcher::getControllers(_PS_FRONT_CONTROLLER_DIR_); 1 Link to comment Share on other sites More sharing options...
prestashop_newuser Posted January 20, 2014 Author Share Posted January 20, 2014 Try with $controllers = Dispatcher::getControllers(_PS_FRONT_CONTROLLER_DIR_); Thanks..that worked.. Link to comment Share on other sites More sharing options...
akashs Posted February 4, 2016 Share Posted February 4, 2016 but who i can fetch cms page name in footer section Link to comment Share on other sites More sharing options...
NemoPS Posted February 5, 2016 Share Posted February 5, 2016 You mean how? If $cms->meta_title does not work, I guess you need to re-fetch the object in a module you hook there Link to comment Share on other sites More sharing options...
Recommended Posts