Hi there, > I know the proper cake way to set content is to use the RequestHandler > Component $this->RequestHandler->setAjax(), but Ive discovered that > that this function tests the value of the HTTP_X_REQUESTED_WITH header, > which is a proprietry value set by the Prototype.js.
If you're using an alternative library, I would suggest setting the request header manually. > 1. Does anyone know if there there any other (standard) ways of > detecting an httpRequest load of content? Other than headers and custom URLs, there is no other way, unless you can figure out a way to cleverly embed a flag in some other part of the request anatomy. > 2. Otherwise, in Cake, what's the best way to serve pages as "bare". > I've tried setting the folowing in my controller Try $this->layout = 'ajax'; or $this->autoLayout = false; (in the Controller). > - request the url preceded by /bare (works, but not in conjunction > with /admin -seems limited) I think that's been fixed recently. Have you tried it both ways? (i.e. /admin/bare and /bare/admin). > How much of CakePHP's code and design is locked into Prototype.js? A lot. Cake is based on the idea of convention over configuration. One of those conventions is the use of the Prototype library. When we first started developing this part of the framework, we considered several libraries (including Dojo) and ended up going with Prototype for a number of reasons. Our hesitations about the file size were more or less negated by the fact that the readability of the file itself means (a) you can remove components for specific situations or applications, and (b) it's uncompressed, which means you can compress it. > For a number of reasons I'm using a different Javascript library than > Prototype.js for my httpRequest activity (using the Yahoo! UI lib in > one project and Dojo Toolkit in another, and sometimes it's not > necessary to include an entire library of code, so I have some hand > rolled variations). Fortunately, most JS libs make customization easy. I imagine it'd also be pretty easy to write the necessary header code into Dojo or Yahoo UI yourself. > Maybe time for me to write a DojoHelper. yikes. Anyone else using these > libs? I've heard about a few people, but I don't really know how many. You're certainly more than welcome to write your own library and post it on CakeForge, so that the rest of Cake's Dojo-and/or-Yahoo-UI-using community can help you continue to develop it. In fact, I would sincerely appreciate any efforts to help expand Cake's support for other JavaScript libraries through 3rd party components and helpers. --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---