On Jan 17, 2007, at 11:13 AM, Rosie F. wrote:

<snip>
However that path fixing, IMO, should be part of the business logic and not part of the views. I don't want to call my path fixer every time I output user-submitted content in the view. I would rather prepare all
the user-submitted content before sending it to the view, because then
I can put it in a loop and not have a million calls to the path-fixing
method scattered throughout the view code.

The correct vehicle for such an object would be a component, then. Its kinda like a helper for controllers.

I'm faced with basically writing my own version of the Html->link and
Html->image methods that can be used in a component, which I really
don't want to do, unless someone here has any other ideas.

Have your new path-fixing component change URLs before the data gets to the view, and have the HtmlHelper create the links with the correct data once it gets there. There really shouldn't be any HTML at the controller level in order to keep logic and presentation properly separated.

Of course, you could also try to fix TinyMCE so the paths are correct from the source... ;)

-- John

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Cake 
PHP" 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