Re: Dynamic Sidebar

2007-06-24 Thread kabturek

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 :

   html xmlns=http://www.w3.org/1999/xhtml;
   head
   title?= $title_for_layout?/title
   /head
   body

   ?= $content_for_layout ?

   ?= $sidebar ?

   /body
   /html

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

2007-06-24 Thread AD7six



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



Dynamic Sidebar

2007-06-23 Thread Contrid

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

2007-06-23 Thread Contrid

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

2007-06-23 Thread Contrid

Sorry if I'm not being clear...

Say for instance I have a layout like this :

html xmlns=http://www.w3.org/1999/xhtml;
head
title?= $title_for_layout?/title
/head
body

?= $content_for_layout ?

?= $sidebar ?

/body
/html

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

2007-06-23 Thread Contrid

Sorry if I'm not being clear...

Say for instance I have a layout like this :

html xmlns=http://www.w3.org/1999/xhtml;
head
title?= $title_for_layout?/title
/head
body

?= $content_for_layout ?

?= $sidebar ?

/body
/html

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

2007-06-23 Thread Contrid

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 :

 html xmlns=http://www.w3.org/1999/xhtml;
 head
 title?= $title_for_layout?/title
 /head
 body

 ?= $content_for_layout ?

 ?= $sidebar ?

 /body
 /html

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

2007-06-23 Thread Jonathan Langevin
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 :
 
  html xmlns=http://www.w3.org/1999/xhtml;
  head
  title?= $title_for_layout?/title
  /head
  body
 
  ?= $content_for_layout ?
 
  ?= $sidebar ?
 
  /body
  /html
 
  ...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 based on Controller/Content

2006-07-24 Thread AD7six

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



Re: Dynamic Sidebar based on Controller/Content

2006-07-24 Thread Bobby Ryterski
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

2006-07-24 Thread AD7six

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