Jump to content

Making a CMS page the homepage


test312

Recommended Posts

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:

  1. This free module: https://mypresta.eu/modules/front-office-features/cms-on-homepage.html
  2. 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

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

  • 11 months later...
  • 2 years later...

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...