Re: Creating links a la Html helper in a component

2007-02-14 Thread dima
Rosie, You've started quite a debate here :). I am currently building a CMS using Cake and tinyMCE as well. I believe you should have all URL mapping done using Components and not the view. The solution I am aiming towards is to have the images referenced like so: // Images is a controller and

Re: Creating links a la Html helper in a component

2007-02-14 Thread Chris Hartjes
On 2/14/07, John David Anderson (_psychic_) <[EMAIL PROTECTED]> wrote: > > > @Chris: > > "If you want to contribute some code that creates this functionality, > many MANY developers would be grateful (me included). > > I could argue endlessly about MVC and why manipulating HTML in the > [controlle

Re: Creating links a la Html helper in a component

2007-02-14 Thread John David Anderson (_psychic_)
On Feb 14, 2007, at 8:58 AM, Rosie F. wrote: > > psychic, I don't think you're really understanding my problem/ > question. > >> If the data was corrected by the controller (via a component or >> whatever) before it hit the view, you'd have to do nothing to the >> HtmlHelper. > > That's what I'm

Re: Creating links a la Html helper in a component

2007-02-14 Thread Chris Hartjes
On 2/14/07, Rosie F. <[EMAIL PROTECTED]> wrote: > > > Well, the responses here have been irksome and not helpful. Through > my own research I found this, in case anyone else needs it: http:// > rossoft.wordpress.com/2006/02/11/cool-flash-effect-3/ > > Rosie Hi Rosie, Sorry that the responses ha

Re: Creating links a la Html helper in a component

2007-02-14 Thread Rosie F.
psychic, I don't think you're really understanding my problem/ question. > If the data was corrected by the controller (via a component or > whatever) before it hit the view, you'd have to do nothing to the > HtmlHelper. That's what I'm doing. I'm correcting the data at the controller. I don't

Re: Creating links a la Html helper in a component

2007-01-17 Thread Langdon Stevenson
Nice one kitten. I didn't know that. I haven't had the problem that Rosie is having with TinyMCE though. I built a content management system for an online magazine and it all just worked. It was a while ago though, so I don't remember exactly what I did. Regards, Langdon Of course, you

Re: Creating links a la Html helper in a component

2007-01-17 Thread Langdon Stevenson
Hi psychic and Rosie > You might consider looking into the benefits of MVC design, just to > see what you might be missing out on with an approach like this. I'm > a biased MVC fan, but looking into it yourself might allow you to > make an educated decision as to how MVC (and Cake) will m

Re: Creating links a la Html helper in a component

2007-01-17 Thread John David Anderson (_psychic_)
On Jan 17, 2007, at 11:45 AM, Rosie F. wrote: > Correcting the URLs is the goal here. The way I am doing it, with > regular expressions, I am finding each anchor and img tag that > contains > one of the problematic paths, exploding all the attributes, fixing the > src or href attribute, and t

Re: Creating links a la Html helper in a component

2007-01-17 Thread kitten
Of course, you could also try to fix TinyMCE so the paths are correct from the source... ;) Rosie: TinyMCE has a configuration option "urlconverter_callback" which lets you define your own JS function to do this kind of stuff. HTH :) Heiner --~--~-~--~~~---~--

Re: Creating links a la Html helper in a component

2007-01-17 Thread Rosie F.
Of course, you could also try to fix TinyMCE so the paths are correct from the source... ;) That would be my preferred method, but if I change the paths in TinyMCE, then it will not display the images in WYSIWYG mode. It needs the physical path to preview assets in WYSIWYG mode. So if the pa

Re: Creating links a la Html helper in a component

2007-01-17 Thread John David Anderson (_psychic_)
On Jan 17, 2007, at 11:13 AM, Rosie F. wrote: 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 conten

Re: Creating links a la Html helper in a component

2007-01-17 Thread Rosie F.
This is part of a content management system in which I allow my users to upload images and files and create links to internal pages using tinyMCE. The problem is that I have to fix the paths for much of the stuff that they are uploading/linking to because tinyMCE creates the links to images and f

Re: Creating links a la Html helper in a component

2007-01-17 Thread John David Anderson (_psychic_)
On Jan 17, 2007, at 10:17 AM, Rosie F. wrote: Hello all, I have a need to create links (both regular and images) from within the controller/component side of things. Normally of course we would use the Html helper to make links. But for this particular need I have, the links must be cre

Creating links a la Html helper in a component

2007-01-17 Thread Rosie F.
Hello all, I have a need to create links (both regular and images) from within the controller/component side of things. Normally of course we would use the Html helper to make links. But for this particular need I have, the links must be created before sending to the view. Is there a componen