hi grigri,

On 1/8/09, grigri <[email protected]> wrote:
>
>  Ok, here's a few things to help you:
>
>  First, that view function of yours belongs in a helper. You should
>  never define functions inside a view template.

I know! was just testing out the theory, am new to recursive functions.

>  From an HTML point of view, there are 2 ways of defining label/input
>  relationships. You can either embed the input inside the label, which
>  makes the relationship obvious, or declare a unique ID for the input,
>  which is referenced by the label using the `for` attribute. This id
>  must be unique throughout the page. The most usual approach is the
>  second one.
>
>  For the data to be sent and received properly to/by cake, each radio
>  element (`<input>`) must have a name attribute and a value attribute.
>  In this case, all of the name attributes should be the same, and each
>  value attribute should be set to the corresponding id of the category.

yep! again my lack of knowledge is with recursive functions, not with
cake or html/css - I would/will clean up the html once I'd got the
looping working.

>  Anyway, here's a helper for you: http://pastie.org/355620

BRILLIANT! that is exactly what I needed :)

>  And here's sample usage with a dummy dataset: http://pastie.org/355621

Again, perfect.

My next challenge is to extend your helper so there's no radios, just
nested lists, then include the associated documents from each
category, with a thumbnail + link and 2 radios - wish me luck!

thanks again, you've saved me a huge amount of time, really appreciated!

Jon

-- 

jon bennett
w: http://www.jben.net/
iChat (AIM): jbendotnet Skype: jon-bennett

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

Reply via email to