Re: renderElement et son $params

2006-09-18 Thread John Zimmerman
On 9/17/06, bicephale [EMAIL PROTECTED] wrote:
Je n'arrive pas à comprendre l'usage et l'utilisation du deuxièmeparamètre de la renderElement.Dans la documentation c'est unarray().J'envoie un array().Dans le fichier élément je peux lire le premier argument mais le
second argument ($params) contient rien dans sa partie Array().Yes, it would help to post in english, at least on this list.He is having trouble understanding what the second parameter for renderElement does.
The second parameter is an array. Within the array you are to pass data to your element.So in your view you would call something like this...
?php echo $this-renderElement('test_element', array('my_variable_name' = 'data for variable') );
?In your /app/views/test_element.thtml you would then have access to $my_variable_name
?php echo $my_variable_name; ?will output the text data for variable.

--~--~-~--~~~---~--~~
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: renderElement et son $params

2006-09-18 Thread nate

Slight correction for the above: the file path would be
/app/views/elements/test_element.thtml


--~--~-~--~~~---~--~~
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: renderElement et son $params

2006-09-18 Thread olle

Thinking of the Element as its own little View can make things easier
to grasp. A View underneath the View, so to speak.

Just like the Controller assigns a few variables to its friend the
View, the View can assign a couple of choice variables to its buddy,
little Element.

Elements and variables: on a purely need-to-know basis. The calling
View decides what is good for Element to know about.

-Olle


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



renderElement et son $params

2006-09-17 Thread bicephale

Je n'arrive pas à comprendre l'usage et l'utilisation du deuxième
paramètre de la renderElement.  Dans la documentation c'est un
array().  J'envoie un array().
Dans le fichier élément je peux lire le premier argument mais le
second argument ($params) contient rien dans sa partie Array().


--~--~-~--~~~---~--~~
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: renderElement et son $params

2006-09-17 Thread Martin Schapendonk

On 9/17/06, bicephale [EMAIL PROTECTED] wrote:
 snip

I suspect you'll have more success if you post in English.

-- 
  Martin Schapendonk, [EMAIL PROTECTED]

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