test312 Posted November 17, 2017 Share Posted November 17, 2017 Hey guys! I'm trying to set a CMS page as homepage in my Prestashop 1.6 but i can't find the way to achieve it. Things i've tried: This free module: https://mypresta.eu/modules/front-office-features/cms-on-homepage.html Replace the index.php with cms.php as i saw a post in internet. But none of them worked for me. Has someone achieved this? I believe lots of people have this problem but i can't find more information in the net. Thanks!! Link to comment Share on other sites More sharing options...
Whiley Posted November 17, 2017 Share Posted November 17, 2017 First you create your cms page, then you open this cms-page in your browser and then you copy the whole url to your clipboard (ctr c) (something like http://yourdomain.tld/xxx/yourcms) Then you open the file: /controllers/front/IndexController.php at about line 37 you find: parent::initContent(); $this->addJS(_THEME_JS_DIR_.'index.js'); between this to lines you insert: Tools::redirect('http://yourdomain.tld/xxx/yourcms'); (the red part is that what you have copied to your clipboard before Now it looks like : parent::initContent(); Tools::redirect('http://yourdomain.tld/xxx/yourcms'); $this->addJS(_THEME_JS_DIR_.'index.js'); Then save the IndexController.php and clear the cache. regards Whiley Link to comment Share on other sites More sharing options...
ventura Posted November 18, 2017 Share Posted November 18, 2017 This will be a better practice to add a redirection in the controller with the Tools instance Tools::redirect($link->getCmsLink(5)); 5 it´s the CMS id Link to comment Share on other sites More sharing options...
test312 Posted November 20, 2017 Author Share Posted November 20, 2017 Thanks for your replies guys! I managed to get it working Link to comment Share on other sites More sharing options...
Eddy Posted October 31, 2018 Share Posted October 31, 2018 Hi, I have a related question, how do you link to the classic home page in the menu? Thanks Link to comment Share on other sites More sharing options...
Alessandro Posted March 15, 2021 Share Posted March 15, 2021 Hi, The solution proposed does use a cms page as the index, but is shows the cms url. Is it possible to keep the default index url? 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