- 11-16-2011 06:00 AM #1WTF Groupie Array
- Join Date
- Oct 2006
- Posts
- 117
- Thanks
- 0
- Thanked 0 Times in 0 Posts
- 11-16-2011 11:50 AM #2Junior Member Array
- Join Date
- Oct 2011
- Posts
- 13
- Thanks
- 0
- Thanked 0 Times in 0 Posts
You will want to create a new layout file in your application, and name it text.ctp (/app/views/layouts/text.ctp).
In this file (text.ctp), add the following code:
Then in your controller action, which will be using this text layout, add the following to the top of that method:Code:<?php header("Content-type: text/plain"); echo $content_for_layout; ?>
And you should be set.Code:$this->layout = 'text';
Hope this helps!






LinkBack URL
About LinkBacks
Reply With Quote
Bookmarks