Jump to content

[SOLVED] Adding Cms Content To Homepage


Snamor

Recommended Posts

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 by Snamor (see edit history)
Link to comment
Share on other sites

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.

  • Like 2
Link to comment
Share on other sites

  • 2 months later...

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.).

  • Like 1
Link to comment
Share on other sites

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...