Friday, September 19, 2014

Re: Best practice to get menu array

By the look of it what you need is a Plugin and inside the Models for the tables you mentioned and at least an Helper to produce the HTML output.
I recently used the MenuBuilder Plugin. You will have to add the logic to retrieve the menu from your Models though.

On Saturday, September 13, 2014 10:57:21 AM UTC+2, Sam Clauw wrote:
I have 2 tables which hold pages information: "pages" and "cms_pages". Now I want to build a menu on every website page with the records within. What's the best practice for this?

Should I make a behavior that loads in the "pages" and "cms_pages" model? If yes, where (and how) should I make the call to that behavior? In the AppModel class?

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