[Solar-talk] Nested controllers
Paul M Jones
pmjones at ciaweb.net
Thu Oct 19 07:46:49 PDT 2006
On Oct 19, 2006, at 9:44 AM, Travis Swicegood wrote:
>> Besides page-types (html/rss/pdf/etc) and site layouts, what would
>> this be used for? I can think of other ways to respond to page-type
>> requests that are more transparent, and for layouts we can put all
>> the in the layout scripts.
>>
>
> The big thing this is used for is to provide a means in the URL of
> pulling out the display elements and rendering one controller/action
> output - for AJAX calls.
>
> Granted, it could be done with a ?out=ajax at the end, but that's less
> elegant that submitting to bookmark/edit instead of site/bookmark/
> edit.
This is a recent development, but you can check $this->_request->isXml
() to see if the "X-Requested-With" header is "XmlHttpRequest". Easy
AJAX recognition; thank Clay for having that idea. :-)
--
Paul M. Jones <http://paul-m-jones.com>
Solar: Simple Object Library and Application Repository
for PHP5. <http://solarphp.com>
Join the Solar community wiki! <http://solarphp.org>
Savant: The simple, elegant, and powerful solution for
templates in PHP. <http://phpsavant.com>
More information about the solar-talk
mailing list