Since you asked...it depends...

If this is an system you're going to be distributing and others will
write plugins for it (like Wordpress), then I would assume the plugin
would need to be installed/activated somehow (meaning NOT just dropped
into the plugin dir). In which case you could read the menu info once
from a config file or from the controller like we are doing and store
it in your db plugins table.  Then you would be able to use your
Plugin model to get all the menu items.

Alternately, if this is a system you're just going to be using, then
you can skip the whole install/active process and just keep a list of
your plugin menu items somewhere (bootstrap, db...)

Another option is the keep the system you have coded above, but add
caching (http://book.cakephp.org/view/764/Cache)

-Matt
http://www.pseudocoder.com




On Feb 11, 4:14 pm, Evert <[email protected]> wrote:
> Hmm, for some reason everybody on IRC is telling me to not use
> controllers for that.
> Most say I should use views and some say I should use models.
> What do you think? And why?
>
> If I should use views, then should I use elements or what? That would
> kinda suck, cause most plugins have just one menu-item. So that would
> mean I'd have to create element-files with just one line of code.
>
> If I should use models, why? how?
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"CakePHP" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to