Monday, May 4, 2015

Re: Where to create common functionalities with view in cakephp?


As Lorenzo mentioned you may need to use a plugin and in that it is included in most pages, you will likely need to put the code in an element.
If it is simple, you may want to just load/use the model(s)/table(s) required in your app controller and use the element where needed to show your component.
You should be able to find what you need in the documentation... http://book.cakephp.org/3.0/en/contents.html  you can find the elements under the view topic.
--Kevin

On Sunday, May 3, 2015 at 6:14:51 PM UTC+7, Abhinav Pathak wrote:
I am new in cakephp. I have a module with name contact us in 1 of my project. This module need to show on almost all pages of the website. So my question is, for this common module can we create component or there is some other way to complete it? I read about the components for the site and found that components does not have own views. Please suggest me how can we do this?

--
Like Us on FaceBook https://www.facebook.com/CakePHP
Find us on Twitter http://twitter.com/CakePHP

---
You received this message because you are subscribed to the Google Groups "CakePHP" group.
To unsubscribe from this group and stop receiving emails from it, send an email to cake-php+unsubscribe@googlegroups.com.
To post to this group, send email to cake-php@googlegroups.com.
Visit this group at http://groups.google.com/group/cake-php.
For more options, visit https://groups.google.com/d/optout.

No comments: