wiscem Posted December 7, 2016 Share Posted December 7, 2016 Hi, I ask if someone knows how to enable/disable displaying left/right columns for a module using PHP. In 1.5 & 1.6 Prestashop versions, I used the following PHP code for controller: class MySearchModuleFrontController extends ModuleFrontController{ public $display_column_left = true; public $display_column_right = true; public function initContent() { $this->display_column_left = false; $this->display_column_right = false; .... } }But now, on PS 1.7, it does not work. I tried many approachs but without result. Thanks for help Best regards Wissem Link to comment Share on other sites More sharing options...
Ader Posted November 22, 2017 Share Posted November 22, 2017 Hello, A working solution is to overwrite the FrontController::getLayout() function to return the layout you want to use. class YourModuleFrontController extends ModuleFrontController { public function getLayout() { return 'layouts/layout-left-column.tpl'; } [...] } Available layouts are located in [YOUR_THEME_DIR/templates/layouts] directory. 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