Snamor Posted March 6, 2013 Share Posted March 6, 2013 (edited) Hi! I'm trying to add a CMS content in the homepage. What I want is some content, that can be managed through the CMS module, under the slider and over the featured products in the homepage. Is there a way to do this using the default Prestashop 1.5 modules or do I need to develop a new one? Thanks! Edited March 8, 2013 by Snamor (see edit history) Link to comment Share on other sites More sharing options...
remyessers Posted March 7, 2013 Share Posted March 7, 2013 I've done this on my site. The text appears under the slider module, but can be edited in the cms section. Add this to the php file of the module which is loaded, in my case tmnivoslider: global $cookie; $cms = new CMS(7, intval($cookie->id_lang)); if (Validate::isLoadedObject($cms)) $smarty->assign('content', $cms->content); where "7" is the ID of my CMS page. Then add {$content} to the TPL file where you want the text to appear. Now you can change the text via the CMS page editor. 2 Link to comment Share on other sites More sharing options...
Snamor Posted March 8, 2013 Author Share Posted March 8, 2013 Great! It's working! Thank you so much! Link to comment Share on other sites More sharing options...
goosedesign Posted June 4, 2013 Share Posted June 4, 2013 Is there a way of doing this (in 1.5.4) on the contact page (or any page) rather than in a module? I tried adding the same code to the override contact controller file and it didn't work. Link to comment Share on other sites More sharing options...
vekia Posted June 4, 2013 Share Posted June 4, 2013 Well, you can achievie this with: edit contact controllers (add to smarty array CMS object with page you want to display) then in contact.tpl file use simple if condition to show content only if you browsing certain page (id_cms=5 id_cms=8 etc.). 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