Re: Dynamic Sidebar
On Jun 24, 4:26 am, Contrid <[EMAIL PROTECTED]> wrote: > I have found the beforeRender() function. > I think this is what I need. http://groups.google.com/group/cake-php/web/frequent-discussions --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Cake PHP" group. To post to this group, send email to cake-php@googlegroups.com 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 -~--~~~~--~~--~--~---
Re: Dynamic Sidebar
Hi > turns cakephp into a proper cms omg im SO afraid ;) greets, On Jun 24, 4:34 am, "Jonathan Langevin" <[EMAIL PROTECTED]> wrote: > so are you using beforeRender to pull your data as needed, to populate the > sidebar "elements"? i'd be interested in seeing how someone turns cakephp > into a proper cms, with dynamic side columns, dynamic templates, template > editing (looked like davidicus cms had that one solved), easy-to-add > modules/components, etc > > On 6/23/07, Contrid <[EMAIL PROTECTED]> wrote: > > > > > I have found the beforeRender() function. > > I think this is what I need. > > > On Jun 24, 3:56 am, Contrid <[EMAIL PROTECTED]> wrote: > > > Sorry if I'm not being clear... > > > > Say for instance I have a layout like this : > > > > http://www.w3.org/1999/xhtml";> > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > ...where $sidebar needs to have dynamic content. > > > It should also be global...visible on all pages of a specific layout. > > > How will I go about this? > > > > I'm not sure if elements are only for static content. > > > > On Jun 24, 3:16 am, Contrid <[EMAIL PROTECTED]> wrote: > > > > > I have discovered the "views/elements" folder. This already helps > > > > alot. > > > > I created a file named "sidebar.thtml" in the "elements" folder. > > > > Now...I need to somehow parse data to the "sidebar" view. > > > > > On Jun 24, 3:13 am, Contrid <[EMAIL PROTECTED]> wrote: > > > > > > Good day, > > > > > > I started reading through the CakePHP manual and stuff today. > > > > > I'm new to MVC and this is the first time I work with it. Please > > bare > > > > > with me. > > > > > > In my default layout ("layouts/default.thtml") I want to have a > > > > > dynamic sidebar which comes consists of data coming from the > > database. > > > > > For example...it could be an array, each key being an array with an > > ID > > > > > and a Title. > > > > > > How will I go about creating a dynamic sidebar? > > > > > Do I create a controller for it, or how? > > > > > > Thank you for your help. > > > > On Jun 24, 3:16 am, Contrid <[EMAIL PROTECTED]> wrote: > > > > > I have discovered the "views/elements" folder. This already helps > > > > alot. > > > > I created a file named "sidebar.thtml" in the "elements" folder. > > > > Now...I need to somehow parse data to the "sidebar" view. > > > > > On Jun 24, 3:13 am, Contrid <[EMAIL PROTECTED]> wrote: > > > > > > Good day, > > > > > > I started reading through the CakePHP manual and stuff today. > > > > > I'm new to MVC and this is the first time I work with it. Please > > bare > > > > > with me. > > > > > > In my default layout ("layouts/default.thtml") I want to have a > > > > > dynamic sidebar which comes consists of data coming from the > > database. > > > > > For example...it could be an array, each key being an array with an > > ID > > > > > and a Title. > > > > > > How will I go about creating a dynamic sidebar? > > > > > Do I create a controller for it, or how? > > > > > > Thank you for your help. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Cake PHP" group. To post to this group, send email to cake-php@googlegroups.com 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 -~--~~~~--~~--~--~---
Re: Dynamic Sidebar
so are you using beforeRender to pull your data as needed, to populate the sidebar "elements"? i'd be interested in seeing how someone turns cakephp into a proper cms, with dynamic side columns, dynamic templates, template editing (looked like davidicus cms had that one solved), easy-to-add modules/components, etc On 6/23/07, Contrid <[EMAIL PROTECTED]> wrote: > > > I have found the beforeRender() function. > I think this is what I need. > > On Jun 24, 3:56 am, Contrid <[EMAIL PROTECTED]> wrote: > > Sorry if I'm not being clear... > > > > Say for instance I have a layout like this : > > > > http://www.w3.org/1999/xhtml";> > > > > > > > > > > > > > > > > > > > > > > > > > > ...where $sidebar needs to have dynamic content. > > It should also be global...visible on all pages of a specific layout. > > How will I go about this? > > > > I'm not sure if elements are only for static content. > > > > On Jun 24, 3:16 am, Contrid <[EMAIL PROTECTED]> wrote: > > > > > > > > > I have discovered the "views/elements" folder. This already helps > > > alot. > > > I created a file named "sidebar.thtml" in the "elements" folder. > > > Now...I need to somehow parse data to the "sidebar" view. > > > > > On Jun 24, 3:13 am, Contrid <[EMAIL PROTECTED]> wrote: > > > > > > Good day, > > > > > > I started reading through the CakePHP manual and stuff today. > > > > I'm new to MVC and this is the first time I work with it. Please > bare > > > > with me. > > > > > > In my default layout ("layouts/default.thtml") I want to have a > > > > dynamic sidebar which comes consists of data coming from the > database. > > > > For example...it could be an array, each key being an array with an > ID > > > > and a Title. > > > > > > How will I go about creating a dynamic sidebar? > > > > Do I create a controller for it, or how? > > > > > > Thank you for your help. > > > > On Jun 24, 3:16 am, Contrid <[EMAIL PROTECTED]> wrote: > > > > > I have discovered the "views/elements" folder. This already helps > > > alot. > > > I created a file named "sidebar.thtml" in the "elements" folder. > > > Now...I need to somehow parse data to the "sidebar" view. > > > > > On Jun 24, 3:13 am, Contrid <[EMAIL PROTECTED]> wrote: > > > > > > Good day, > > > > > > I started reading through the CakePHP manual and stuff today. > > > > I'm new to MVC and this is the first time I work with it. Please > bare > > > > with me. > > > > > > In my default layout ("layouts/default.thtml") I want to have a > > > > dynamic sidebar which comes consists of data coming from the > database. > > > > For example...it could be an array, each key being an array with an > ID > > > > and a Title. > > > > > > How will I go about creating a dynamic sidebar? > > > > Do I create a controller for it, or how? > > > > > > Thank you for your help. > > > > > --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Cake PHP" group. To post to this group, send email to cake-php@googlegroups.com 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 -~--~~~~--~~--~--~---
Re: Dynamic Sidebar
I have found the beforeRender() function. I think this is what I need. On Jun 24, 3:56 am, Contrid <[EMAIL PROTECTED]> wrote: > Sorry if I'm not being clear... > > Say for instance I have a layout like this : > > http://www.w3.org/1999/xhtml";> > > > > > > > > > > > > > ...where $sidebar needs to have dynamic content. > It should also be global...visible on all pages of a specific layout. > How will I go about this? > > I'm not sure if elements are only for static content. > > On Jun 24, 3:16 am, Contrid <[EMAIL PROTECTED]> wrote: > > > > > I have discovered the "views/elements" folder. This already helps > > alot. > > I created a file named "sidebar.thtml" in the "elements" folder. > > Now...I need to somehow parse data to the "sidebar" view. > > > On Jun 24, 3:13 am, Contrid <[EMAIL PROTECTED]> wrote: > > > > Good day, > > > > I started reading through the CakePHP manual and stuff today. > > > I'm new to MVC and this is the first time I work with it. Please bare > > > with me. > > > > In my default layout ("layouts/default.thtml") I want to have a > > > dynamic sidebar which comes consists of data coming from the database. > > > For example...it could be an array, each key being an array with an ID > > > and a Title. > > > > How will I go about creating a dynamic sidebar? > > > Do I create a controller for it, or how? > > > > Thank you for your help. > > On Jun 24, 3:16 am, Contrid <[EMAIL PROTECTED]> wrote: > > > I have discovered the "views/elements" folder. This already helps > > alot. > > I created a file named "sidebar.thtml" in the "elements" folder. > > Now...I need to somehow parse data to the "sidebar" view. > > > On Jun 24, 3:13 am, Contrid <[EMAIL PROTECTED]> wrote: > > > > Good day, > > > > I started reading through the CakePHP manual and stuff today. > > > I'm new to MVC and this is the first time I work with it. Please bare > > > with me. > > > > In my default layout ("layouts/default.thtml") I want to have a > > > dynamic sidebar which comes consists of data coming from the database. > > > For example...it could be an array, each key being an array with an ID > > > and a Title. > > > > How will I go about creating a dynamic sidebar? > > > Do I create a controller for it, or how? > > > > Thank you for your help. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Cake PHP" group. To post to this group, send email to cake-php@googlegroups.com 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 -~--~~~~--~~--~--~---
Re: Dynamic Sidebar
Sorry if I'm not being clear... Say for instance I have a layout like this : http://www.w3.org/1999/xhtml";> ...where $sidebar needs to have dynamic content. It should also be global...visible on all pages of a specific layout. How will I go about this? I'm not sure if elements are only for static content. On Jun 24, 3:16 am, Contrid <[EMAIL PROTECTED]> wrote: > I have discovered the "views/elements" folder. This already helps > alot. > I created a file named "sidebar.thtml" in the "elements" folder. > Now...I need to somehow parse data to the "sidebar" view. > > On Jun 24, 3:13 am, Contrid <[EMAIL PROTECTED]> wrote: > > > Good day, > > > I started reading through the CakePHP manual and stuff today. > > I'm new to MVC and this is the first time I work with it. Please bare > > with me. > > > In my default layout ("layouts/default.thtml") I want to have a > > dynamic sidebar which comes consists of data coming from the database. > > For example...it could be an array, each key being an array with an ID > > and a Title. > > > How will I go about creating a dynamic sidebar? > > Do I create a controller for it, or how? > > > Thank you for your help. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Cake PHP" group. To post to this group, send email to cake-php@googlegroups.com 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 -~--~~~~--~~--~--~---
Re: Dynamic Sidebar
Sorry if I'm not being clear... Say for instance I have a layout like this : http://www.w3.org/1999/xhtml";> ...where $sidebar needs to have dynamic content. It should also be global...visible on all pages of a specific layout. How will I go about this? I'm not sure if elements are only for static content. On Jun 24, 3:16 am, Contrid <[EMAIL PROTECTED]> wrote: > I have discovered the "views/elements" folder. This already helps > alot. > I created a file named "sidebar.thtml" in the "elements" folder. > Now...I need to somehow parse data to the "sidebar" view. > > On Jun 24, 3:13 am, Contrid <[EMAIL PROTECTED]> wrote: > > > Good day, > > > I started reading through the CakePHP manual and stuff today. > > I'm new to MVC and this is the first time I work with it. Please bare > > with me. > > > In my default layout ("layouts/default.thtml") I want to have a > > dynamic sidebar which comes consists of data coming from the database. > > For example...it could be an array, each key being an array with an ID > > and a Title. > > > How will I go about creating a dynamic sidebar? > > Do I create a controller for it, or how? > > > Thank you for your help. On Jun 24, 3:16 am, Contrid <[EMAIL PROTECTED]> wrote: > I have discovered the "views/elements" folder. This already helps > alot. > I created a file named "sidebar.thtml" in the "elements" folder. > Now...I need to somehow parse data to the "sidebar" view. > > On Jun 24, 3:13 am, Contrid <[EMAIL PROTECTED]> wrote: > > > Good day, > > > I started reading through the CakePHP manual and stuff today. > > I'm new to MVC and this is the first time I work with it. Please bare > > with me. > > > In my default layout ("layouts/default.thtml") I want to have a > > dynamic sidebar which comes consists of data coming from the database. > > For example...it could be an array, each key being an array with an ID > > and a Title. > > > How will I go about creating a dynamic sidebar? > > Do I create a controller for it, or how? > > > Thank you for your help. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Cake PHP" group. To post to this group, send email to cake-php@googlegroups.com 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 -~--~~~~--~~--~--~---
Re: Dynamic Sidebar
I have discovered the "views/elements" folder. This already helps alot. I created a file named "sidebar.thtml" in the "elements" folder. Now...I need to somehow parse data to the "sidebar" view. On Jun 24, 3:13 am, Contrid <[EMAIL PROTECTED]> wrote: > Good day, > > I started reading through the CakePHP manual and stuff today. > I'm new to MVC and this is the first time I work with it. Please bare > with me. > > In my default layout ("layouts/default.thtml") I want to have a > dynamic sidebar which comes consists of data coming from the database. > For example...it could be an array, each key being an array with an ID > and a Title. > > How will I go about creating a dynamic sidebar? > Do I create a controller for it, or how? > > Thank you for your help. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Cake PHP" group. To post to this group, send email to cake-php@googlegroups.com 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 -~--~~~~--~~--~--~---
Dynamic Sidebar
Good day, I started reading through the CakePHP manual and stuff today. I'm new to MVC and this is the first time I work with it. Please bare with me. In my default layout ("layouts/default.thtml") I want to have a dynamic sidebar which comes consists of data coming from the database. For example...it could be an array, each key being an array with an ID and a Title. How will I go about creating a dynamic sidebar? Do I create a controller for it, or how? Thank you for your help. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Cake PHP" group. To post to this group, send email to cake-php@googlegroups.com 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 -~--~~~~--~~--~--~---
Re: Dynamic Sidebar based on Controller/Content
Hi Bobby, Just (another) thought, you may find that something like this is more appropriate. Here's a variation on the theme, no component, but with a menu element: // Defined in app_controller var $menuContext = Array(); // Defined in app_controller function beforeFilter () { $this->_defineMenuContext(); $this->controller->set('ContextMenu',$this->menuContext); } // Defined or derived in each controller function _defineMenuContext() { // add logic to change based on current function $this->menuContext[] = Array ("Something","/Blah/Blah"); } In the relavent element, loop through the $ContextMenu variable creating the context relavent links for your controller. Cheers, AD7six --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Cake PHP" group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cake-php -~--~~~~--~~--~--~---
Re: Dynamic Sidebar based on Controller/Content
Thanks. I'll look over your tutorial.CSSPlay has lots of cool stuff.On 7/24/06, AD7six <[EMAIL PROTECTED] > wrote:Hi Bobby,Can´t comment on "best" way but: A bit of "request action" might be the way forwards; as the menu itemsare at least in part contextual: there is also a tutorial I wrote onthe wiki with regards to "CSS Menus" which indicates a different approach to seperating the logic (component) from the display(element). Might be useful, at least in contrast/to evaluateapproaches.Cheers,AD7sixPS. never seen the CSSPlay gallery before - like it. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Cake PHP" group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cake-php -~--~~~~--~~--~--~---
Re: Dynamic Sidebar based on Controller/Content
Hi Bobby, Can´t comment on "best" way but: A bit of "request action" might be the way forwards; as the menu items are at least in part contextual: there is also a tutorial I wrote on the wiki with regards to "CSS Menus" which indicates a different approach to seperating the logic (component) from the display (element). Might be useful, at least in contrast/to evaluate approaches. Cheers, AD7six PS. never seen the CSSPlay gallery before - like it. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Cake PHP" group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cake-php -~--~~~~--~~--~--~---
Dynamic Sidebar based on Controller/Content
I've been fiddling with CakePHP for a month or so now and I must say I like it. I like enough to develop the next generation of the Livin' Dead Productions site with it. The current version (located at http://ldp.blackhawkdata.com for the moment. Domain problems are not fun) is pretty simple. I took my cousin's idea, cleaned it up and wrote some PHP. I think a CakePHP site would be much better.I've got most of the basic stuff layed out and some coded. I have a fluid layout (it expands with the browser window) with a header, global nav, sidebar, content and a footer. I'd like to have dynamic content in the sidebar, but not just any dynamic content. I want to have content based on the content of the page. For example, I'm working on a gallery function under the art controller. It will output a nice little image gallery based on a CSS Play gallery ( http://cssplay.co.uk/menu/gallery_click.html) containing the art the user has specified (in other words, dynamic galleries). In the gallery, the sidebar would have links to refine the gallery with a search page and perhaps a link to the most popular or pre-set galleries. I was wondering the best way to accomplish this. I'm figuring a bit of coding in the sidebar component of the layout. $this->requestAction() could call a sidebars controller for that particular page or a sidebar function for the current controller. Any help or suggestions would be great. I'm sure I could scrape something together, but a little collaboration would be better and hopefully help some other people too.-- If at first you don't succeed, destroy all evidence that you tried. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Cake PHP" group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cake-php -~--~~~~--~~--~--~---