Here's the scenario:

I've got a list of Photographers; each Photographer has a list of
Emphases that they specialize in; each Emphasis has additional info
(like 'experience').
In the Edit view, I'm looping through the Emphases and creating the
form. However, I also have an "Add new" ajax functionality to
dynamically add a new Emphasis.

Now, obviously these 2 forms are identical, and would much rather
modularize these in to a single piece.

So far, from what I've found, my options are:

1.) requestAction - which would retrieve the list of Emphases.
However: I already have that list when I retrieved the Photographer's
info, so that seems kind of redundant (plus processing overhead - yes,
I know it wouldn't be a lot)

2.) renderElement. And here's my beef with 'elements': I will only
ever need this 'Emphasis' requirement from within 'Photographer', so
why should it go in 'elements' which are intended to be "small blocks
of presentation code that needs to be repeated from page to page...".
Strictly speaking, this is a small block that is repeated; however,
it's only specific to a Photographer. It just doesn't make much sense
to have it in a "global"-type folder.

I'm coming from a RoR background where such things would simply be
prefixed with an underscore ... so in this case, rather than have
`elements/emphasis.ctp` it would be in `photographers/
_emphasis.ctp` ... it's just more modular...

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