useDbConfig HABTM Missing Table

2008-02-22 Thread Contrid

Good day,

I have two models, both with a useDbConfig variable set to a different
database. These two models have a HABTM association. Even though I've
defined the useDbConfig and the tables exist in the other database, I
still get a Missing Database Table message.

Any ideas how I can ensure that the correct database is being queried
upon the recursive association?
--~--~-~--~~~---~--~~
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
-~--~~~~--~~--~--~---



Undefined variable: paginator

2007-07-13 Thread Contrid

Hi there,

I'm getting the error :

Undefined variable: paginator

I have an element. Inside this element, I use requestAction(); to call
upon a Controller action. This action checks if it was requested by
check for $this - params['requested']. If it was requested, it simply
returns the data. Problem is...inside my element, I use the
PaginatorHelper. Now...I'm getting this error.

Any ideas how I can solve this?
Your help will be greatly appreciated.
I've googled around, but cannot find anything.


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



findAll findAllThreaded doesn't work

2007-07-10 Thread Contrid

Hi there,

I built an application locally and it works perfectly fine. Now...I
uploaded everything to my server and built the database. Everything
worked. Until I added categories, sub-categories and then items to
these categories. The application simply dies out. By commenting out
the findAll and findAllThreaded methods in my controller, the script
runs, so I'm thinking that there has to be something wrong with my
model associations. I specifically think there is something wrong with
my Category model and it's associations. See my models below.

This is my Category model :

?php

class Category extends AppModel {
//model name
var $name = Category;

//hasMany assocation
var $hasMany = array(
'Item'  =  array(
'className' =  'Item',
'foreignKey'=  'category_id',
'dependent' =  true
),
'Category'  =  array(
'className' =  'Category',
'foreignKey'=  'parent_id',
'dependent' =  true
)
);
}

?

...and here is my Item model.

?php

class Item extends AppModel {
//model name
var $name = Item;

//to which model does it belong?
var $belongsTo = array(
'Category'  =  array(
'className' =  'Category',
'foreignKey'=  'category_id',
),
'User'  =  array(
'className' =  'User',
'foreignKey'=  'user_id',
)
);
}

?

If someone can help me figure out why this script is dying out, it
would be greatly appreciated. It works locally without any problems,
so there has to be some type of difference in configuration between my
web servers.

Also...
I'm not sure where to find the error logs, etc...
I checked in tmp/logs/error.log and tmp/logs/debug.log but I don't see
anything.

Please help me! Greatly appreciated!


--~--~-~--~~~---~--~~
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: findAll findAllThreaded doesn't work

2007-07-10 Thread Contrid

I also get this error :

--
Warning: Call-time pass-by-reference has been deprecated - argument
passed by value; If you would like to pass it by reference, modify the
declaration of [runtime function name](). If you would like to enable
call-time pass-by-reference, you can set
allow_call_time_pass_reference to true in your INI file. However,
future versions may not support this any longer. in /var/www/vhosts/
vulay.com/httpdocs/app/controllers/components/oth_auth.php on line 794
--

...but I'm not sure if it has anything to do with it.
I edited my php.ini file on my remote server and restarted Apache. It
still has no difference.
This might actually be the issue, but I'm not sure how to get rid of
it.

On Jul 11, 2:08 am, Contrid [EMAIL PROTECTED] wrote:
 Hi there,

 I built an application locally and it works perfectly fine. Now...I
 uploaded everything to my server and built the database. Everything
 worked. Until I added categories, sub-categories and then items to
 these categories. The application simply dies out. By commenting out
 the findAll and findAllThreaded methods in my controller, the script
 runs, so I'm thinking that there has to be something wrong with my
 model associations. I specifically think there is something wrong with
 my Category model and it's associations. See my models below.

 This is my Category model :

 ?php

 class Category extends AppModel {
 //model name
 var $name = Category;

 //hasMany assocation
 var $hasMany = array(
 'Item'  =   array(
 'className' =   'Item',
 'foreignKey'=   'category_id',
 'dependent' =   true
 ),
 'Category'  =   array(
 'className' =   'Category',
 'foreignKey'=   'parent_id',
 'dependent' =   true
 )
 );

 }

 ?

 ...and here is my Item model.

 ?php

 class Item extends AppModel {
 //model name
 var $name = Item;

 //to which model does it belong?
 var $belongsTo = array(
 'Category'  =   array(
 'className' =   'Category',
 'foreignKey'=   'category_id',
 ),
 'User'  =   array(
 'className' =   'User',
 'foreignKey'=   'user_id',
 )
 );

 }

 ?

 If someone can help me figure out why this script is dying out, it
 would be greatly appreciated. It works locally without any problems,
 so there has to be some type of difference in configuration between my
 web servers.

 Also...
 I'm not sure where to find the error logs, etc...
 I checked in tmp/logs/error.log and tmp/logs/debug.log but I don't see
 anything.

 Please help me! Greatly appreciated!


--~--~-~--~~~---~--~~
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: findAll findAllThreaded doesn't work

2007-07-10 Thread Contrid

I managed to get rid of the error. It didn't have anything to do with
the fact that my script is dying out.
In one of my components, there was the following code :

// setAjax is deprecated in 1.2
if($this-is_11()) //1.1
{
$this-RequestHandler-setAjax($this-controller);
}
else // 1.2
{
$this-controller-layout = $this-RequestHandler-ajaxLayout;
$this-RequestHandler-respondAs('html', array('charset' =
'UTF-8'));
}

...and it seemed to be executing the code inside the first condition.
So I got rid of that. But the script still dies out.
There's got to be something wrong with either my model association or
with my web server configuration

On Jul 11, 2:12 am, Contrid [EMAIL PROTECTED] wrote:
 I also get this error :

 --
 Warning: Call-time pass-by-reference has been deprecated - argument
 passed by value; If you would like to pass it by reference, modify the
 declaration of [runtime function name](). If you would like to enable
 call-time pass-by-reference, you can set
 allow_call_time_pass_reference to true in your INI file. However,
 future versions may not support this any longer. in /var/www/vhosts/
 vulay.com/httpdocs/app/controllers/components/oth_auth.php on line 794
 --

 ...but I'm not sure if it has anything to do with it.
 I edited my php.ini file on my remote server and restarted Apache. It
 still has no difference.
 This might actually be the issue, but I'm not sure how to get rid of
 it.

 On Jul 11, 2:08 am, Contrid [EMAIL PROTECTED] wrote:

  Hi there,

  I built an application locally and it works perfectly fine. Now...I
  uploaded everything to my server and built the database. Everything
  worked. Until I added categories, sub-categories and then items to
  these categories. The application simply dies out. By commenting out
  the findAll and findAllThreaded methods in my controller, the script
  runs, so I'm thinking that there has to be something wrong with my
  model associations. I specifically think there is something wrong with
  my Category model and it's associations. See my models below.

  This is my Category model :

  ?php

  class Category extends AppModel {
  //model name
  var $name = Category;

  //hasMany assocation
  var $hasMany = array(
  'Item'  =   array(
  'className' =   'Item',
  'foreignKey'=   'category_id',
  'dependent' =   true
  ),
  'Category'  =   array(
  'className' =   'Category',
  'foreignKey'=   'parent_id',
  'dependent' =   true
  )
  );

  }

  ?

  ...and here is my Item model.

  ?php

  class Item extends AppModel {
  //model name
  var $name = Item;

  //to which model does it belong?
  var $belongsTo = array(
  'Category'  =   array(
  'className' =   'Category',
  'foreignKey'=   'category_id',
  ),
  'User'  =   array(
  'className' =   'User',
  'foreignKey'=   'user_id',
  )
  );

  }

  ?

  If someone can help me figure out why this script is dying out, it
  would be greatly appreciated. It works locally without any problems,
  so there has to be some type of difference in configuration between my
  web servers.

  Also...
  I'm not sure where to find the error logs, etc...
  I checked in tmp/logs/error.log and tmp/logs/debug.log but I don't see
  anything.

  Please help me! Greatly appreciated!


--~--~-~--~~~---~--~~
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: findAll findAllThreaded doesn't work

2007-07-10 Thread Contrid

WOW...stranger than ever...
I have an administration panel for this application.
In the admin panel, everything works PERFECTLY fine.
Same queries, same controllers, everything...
What could the issue be? mod_rewrite?

On Jul 11, 2:17 am, Contrid [EMAIL PROTECTED] wrote:
 I managed to get rid of the error. It didn't have anything to do with
 the fact that my script is dying out.
 In one of my components, there was the following code :

 // setAjax is deprecated in 1.2
 if($this-is_11()) //1.1
 {
 $this-RequestHandler-setAjax($this-controller);}

 else // 1.2
 {
 $this-controller-layout = $this-RequestHandler-ajaxLayout;
 $this-RequestHandler-respondAs('html', array('charset' =
 'UTF-8'));

 }

 ...and it seemed to be executing the code inside the first condition.
 So I got rid of that. But the script still dies out.
 There's got to be something wrong with either my model association or
 with my web server configuration

 On Jul 11, 2:12 am, Contrid [EMAIL PROTECTED] wrote:

  I also get this error :

  --
  Warning: Call-time pass-by-reference has been deprecated - argument
  passed by value; If you would like to pass it by reference, modify the
  declaration of [runtime function name](). If you would like to enable
  call-time pass-by-reference, you can set
  allow_call_time_pass_reference to true in your INI file. However,
  future versions may not support this any longer. in /var/www/vhosts/
  vulay.com/httpdocs/app/controllers/components/oth_auth.php on line 794
  --

  ...but I'm not sure if it has anything to do with it.
  I edited my php.ini file on my remote server and restarted Apache. It
  still has no difference.
  This might actually be the issue, but I'm not sure how to get rid of
  it.

  On Jul 11, 2:08 am, Contrid [EMAIL PROTECTED] wrote:

   Hi there,

   I built an application locally and it works perfectly fine. Now...I
   uploaded everything to my server and built the database. Everything
   worked. Until I added categories, sub-categories and then items to
   these categories. The application simply dies out. By commenting out
   the findAll and findAllThreaded methods in my controller, the script
   runs, so I'm thinking that there has to be something wrong with my
   model associations. I specifically think there is something wrong with
   my Category model and it's associations. See my models below.

   This is my Category model :

   ?php

   class Category extends AppModel {
   //model name
   var $name = Category;

   //hasMany assocation
   var $hasMany = array(
   'Item'  =   array(
   'className' =   'Item',
   'foreignKey'=   'category_id',
   'dependent' =   true
   ),
   'Category'  =   array(
   'className' =   'Category',
   'foreignKey'=   'parent_id',
   'dependent' =   true
   )
   );

   }

   ?

   ...and here is my Item model.

   ?php

   class Item extends AppModel {
   //model name
   var $name = Item;

   //to which model does it belong?
   var $belongsTo = array(
   'Category'  =   array(
   'className' =   'Category',
   'foreignKey'=   'category_id',
   ),
   'User'  =   array(
   'className' =   'User',
   'foreignKey'=   'user_id',
   )
   );

   }

   ?

   If someone can help me figure out why this script is dying out, it
   would be greatly appreciated. It works locally without any problems,
   so there has to be some type of difference in configuration between my
   web servers.

   Also...
   I'm not sure where to find the error logs, etc...
   I checked in tmp/logs/error.log and tmp/logs/debug.log but I don't see
   anything.

   Please help me! Greatly appreciated!


--~--~-~--~~~---~--~~
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: findAll findAllThreaded doesn't work

2007-07-10 Thread Contrid

Any help or questions would be greatly appreciated.
I'm practically crying...because it works perfectly locally and now,
on the remote server, it doesn't.
But it's just the front-end that doesn't work. For some odd reason,
the admin panel ('/admin/') works perfectly fine.

On Jul 11, 2:24 am, Contrid [EMAIL PROTECTED] wrote:
 WOW...stranger than ever...
 I have an administration panel for this application.
 In the admin panel, everything works PERFECTLY fine.
 Same queries, same controllers, everything...
 What could the issue be? mod_rewrite?

 On Jul 11, 2:17 am, Contrid [EMAIL PROTECTED] wrote:

  I managed to get rid of the error. It didn't have anything to do with
  the fact that my script is dying out.
  In one of my components, there was the following code :

  // setAjax is deprecated in 1.2
  if($this-is_11()) //1.1
  {
  $this-RequestHandler-setAjax($this-controller);}

  else // 1.2
  {
  $this-controller-layout = $this-RequestHandler-ajaxLayout;
  $this-RequestHandler-respondAs('html', array('charset' =
  'UTF-8'));

  }

  ...and it seemed to be executing the code inside the first condition.
  So I got rid of that. But the script still dies out.
  There's got to be something wrong with either my model association or
  with my web server configuration

  On Jul 11, 2:12 am, Contrid [EMAIL PROTECTED] wrote:

   I also get this error :

   --
   Warning: Call-time pass-by-reference has been deprecated - argument
   passed by value; If you would like to pass it by reference, modify the
   declaration of [runtime function name](). If you would like to enable
   call-time pass-by-reference, you can set
   allow_call_time_pass_reference to true in your INI file. However,
   future versions may not support this any longer. in /var/www/vhosts/
   vulay.com/httpdocs/app/controllers/components/oth_auth.php on line 794
   --

   ...but I'm not sure if it has anything to do with it.
   I edited my php.ini file on my remote server and restarted Apache. It
   still has no difference.
   This might actually be the issue, but I'm not sure how to get rid of
   it.

   On Jul 11, 2:08 am, Contrid [EMAIL PROTECTED] wrote:

Hi there,

I built an application locally and it works perfectly fine. Now...I
uploaded everything to my server and built the database. Everything
worked. Until I added categories, sub-categories and then items to
these categories. The application simply dies out. By commenting out
the findAll and findAllThreaded methods in my controller, the script
runs, so I'm thinking that there has to be something wrong with my
model associations. I specifically think there is something wrong with
my Category model and it's associations. See my models below.

This is my Category model :

?php

class Category extends AppModel {
//model name
var $name = Category;

//hasMany assocation
var $hasMany = array(
'Item'  =   array(
'className' =   'Item',
'foreignKey'=   'category_id',
'dependent' =   true
),
'Category'  =   array(
'className' =   'Category',
'foreignKey'=   'parent_id',
'dependent' =   true
)
);

}

?

...and here is my Item model.

?php

class Item extends AppModel {
//model name
var $name = Item;

//to which model does it belong?
var $belongsTo = array(
'Category'  =   array(
'className' =   'Category',
'foreignKey'=   'category_id',
),
'User'  =   array(
'className' =   'User',
'foreignKey'=   'user_id',
)
);

}

?

If someone can help me figure out why this script is dying out, it
would be greatly appreciated. It works locally without any problems,
so there has to be some type of difference in configuration between my
web servers.

Also...
I'm not sure where to find the error logs, etc...
I checked in tmp/logs/error.log and tmp/logs/debug.log but I don't see
anything.

Please help me! Greatly appreciated!


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

save 'modified' field doesn't update

2007-07-08 Thread Contrid

Hey there,

I'm executing the save() method on my model, but the 'modified' field
in the database table simply doesn't update. It should update
automatically, right? If so...what could be the cause of this?

I'll be digging into the code shortly. Just want to hear what you have
to say.

Best,
Antonie


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



Render view without layout

2007-07-04 Thread Contrid

Hi there,

Within my current view, I want to include another view.
I tried using :

?= $this - render('view_name'); ?

...but it renders the entire layout.
I just want the content inside of the view file.

How can I accomplish this?
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: Render view without layout

2007-07-04 Thread Contrid

Thanks for the responses guys! Greatly appreciated!

I could use the 'ajax' feature...
But the problem is that I'll then need the Scriptaculous libraries
included.
I don't want that, since I already have jQuery integrated.
How can I make jQuery work with this?

Best,

On Jul 4, 8:00 pm, [EMAIL PROTECTED]
[EMAIL PROTECTED] wrote:
 All you need to do is type $this-render('view_name','ajax');

 ajax is a layout which just contains ?php echo $content_for_layout; ?

  without all the usual layout.ctp stuff.

 this also follows if for whatever reason you need to change the
 layout. (checkout the manual page on controllers for how render works)

 Simon

 On Jul 4, 5:07 pm, Contrid [EMAIL PROTECTED] wrote:

  Hi there,

  Within my current view, I want to include another view.
  I tried using :

  ?= $this - render('view_name'); ?

  ...but it renders the entire layout.
  I just want the content inside of the view file.

  How can I accomplish this?
  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: $html-tagErrorMsg

2007-06-30 Thread Contrid

I have the same issue here...
Been trying to figure it out, but it's a bit of a mystery
Did you get it sorted out?

On Jun 12, 8:55 pm, PiLLo [EMAIL PROTECTED] wrote:
 I'm a little frustrated because i have a problem invoking de $html-

 tagErrorMsgon one of my views.

 As a resume i present the next files:
 *
 View: add_admin.thtml
 
 ?php echo $html-formTag('addAdmin','post'); ?
p
Usuario:
?php echo $html-input('User/username', array('size' = '40'))?

?php echo $html-tagErrorMsg('User/username','Wrong value'') ?

/p
p
password:
?php echo $html-input('User/accesskey', array('size' =
 '40')) ?
?php echo $html-tagErrorMsg('User/accesskey','Wrong value.') ?

/p
p
?php echo $html-submit('Save') ?
/p
   /form

 *
 Controllers: administrators_controller.php
 
 class AdministratorsController extends AppController{
 function addAdmin{

 if(!empty($this-data['User'])){
 $this-requestAction(/users/add);
 }

 }

 }

 ***
 Controllers: users_controller.php
 **

 class UsersController  extends AppController{
  function add(){
 $validate=!$this-User-save($this-data['User'])?$this-User-

 invalidFields():true;
  }
 }

 
 Model: user.php
 *
 class User extends AppModel{

 var $name = User;
 var $validate = array('username' = '/[a-z0-9]{1,}$/i',
   'accesskey'= '/[a-z0-9]{1,}$/i'
 );

 }

 So, everything is fine to me, but when i introduce a wrong value in
 the input tag...and if i
 print the return value from UsersController::add i get this: Array
 ( [username] = 1 [accesskey] = 1 )
 But the messages are not displayed on the view, I would be grateful if
 anyone can help me or give some insight


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



Admin Routes. Your advice?

2007-06-26 Thread Contrid

Hi there,

I would like to get some feedback on a specific approach I'm taking. I
don't know if this is normal and if it's good (CakePHP) coding
practice, since this is my first CakePHP application.

I have added a route in my /app/config/routes.php document. It looks
like this :

$Route - connect('/admin', array('controller' = 'admin', 'action' =
'index'));

...which takes a user/admin to the index method of the AdminController
controller whenever /admin/ is accessed.

Now...whenever, let's say /admin/files/ is accessed, the user will
go to the admin_index method/function of the FilesController
controller in my application.

Another example is, let's say a user goes to /admin/users/ the user
will go to the admin_index method/function inside the
UsersController controller.

Last example. The administrator is about to edit a user account and
goes to /admin/users/edit with POST or GET data. This will mean that
the admin_edit method is executed inside the UsersController
controller.

Is this fine?
What do you think about the approach?
Is it abnormal to have my admin functions inside the same controller
used by users?


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