The50 Posted June 27, 2017 Share Posted June 27, 2017 Hello, I have a problem. How can I call a contact-form function and have it on any custom CMS page I created? The page is created via backend and it uses cms.tpl template. Now I need to have contact-form.tpl inside it. I did an override of both CmsController.php and ContactFormController.php, but I don't know how can I call contact form from my CmsController.php. If you need more info - feel free to ask. I tried https://www.prestashop.com/forums/topic/430454-tutorial-ps-16-adding-cms-content-to-the-contact-page/ this tutorial, but the function from ContactFormController.php doesn't get called at all if I use only CMS custom page. Any ideas? Link to comment Share on other sites More sharing options...
shikotak Posted December 22, 2018 Share Posted December 22, 2018 Hi @The50 Grate question. If you find the solution for it, please let me know. Link to comment Share on other sites More sharing options...
Apar Posted December 23, 2018 Share Posted December 23, 2018 I think the idea would be to create a custom hook in your Contact form module and perform a hook execution cms.tpl but you would need to control hook execution according to cms id so that contact form does not get displayed on each cms page. Apart from that you could also create a new front controller for Contact form module then do anything you need. No need to perform any changes in the cms templates and php files. This would be the best option. 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