Jump to content

Want to add a cms page to contact-form.tpl


crpereyra1

Recommended Posts

I want to add a list of people at the end of my contact-form.tpl file.  I know i could do this by writing html straight into the .tpl file.  However I want this to be easily editable.  My idea was to create a cms page that would contain the list of people, and then add that cms page to the contact-form.tpl.  That way any time I make a change to the cms page it would update my contacts page automatically.  What is the best way to do this?

 

Thank you for any help.

Link to comment
Share on other sites

Hi, in the initContent fonction of your ContactController file, you need to instanciate the concerned cms 

 

example if you cms page as 3 for id

$cmsContacts = (3, $this->context->language->id);

then you send this to smarty

$this->context->smarty->assign('cmsContacts', $cmsContacts);

and now you can get this cms content in your contact template by using {$cmsContacts->content}

Edited by fred-vinapresta (see edit history)
Link to comment
Share on other sites

  • 2 months 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...