Hello all, I am developing a cake app with 1.2alpha (I am planning to upgrade to latest SVN soon) and I need some good ideas. Maybe you can help me:
Use Cases: - I like to be able to connect some data stored in the database (called "connected data") to any possible URL (controller/action/ param) - retrieve connected data depending on the URL - pushing the data to current view of controller/action My thoughts so far: - create a component which is used by app_controller - some models are needed: one stores the connected data and another stores all possible paths (controller, action, param), a HABTM table connects data and paths - the component accesses the database to query the model which stores the data, the find has to be limited to the current path (controller/ action/param) via HABTM condition - the retrieved data is then set in the viewvars - a element displays the connected data in any view if set in viewvars My concern/question: - Is there another, maybe better way connecting database stored data to any URL (controller-action-param)? To understand my questions: What I want to do in detail is the following. I have a CMS system which consists of multiple controllers e.g. events, courses and members. I like to have a admin page where I can define items which are displayed beside any other viewable action - think of a small memo on a post-it which is shown beside the events and members list, but not when viewing course actions. Using wildcards or concrete values define when to show the connected data and when not to show. All possible paths are predefined in another model table. I do not like to connect data to another model items by HABTM, because I like to connect data to any possible controller-action. I need this as otherwise it would not be possible to query connected data if the controller-action itself does not query the database (e.g. /events/ viewall returns 0 items). Any ideas, hints, best practices? Any help will be appreciated! Christian --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
