I'm using the following code in my stories_controller:

function index(){
        $stories = $this->Story->findAll(null, array('id', 'plot', 'author',
'created'), 'created DESC');
        $stories_array = array();
        foreach($stories as $story){
                $story_id = $story['Story']['id'];
                $stories_array[$story_id] = $this->RfRating-
>getRatingInfo($story_id, $_SERVER['REMOTE_ADDR']);
        }
        //$this->set('stories', $this->Story->findAll(null, array('id',
'plot', 'author', 'created'), 'created DESC'));
        $this->set('stories', $stories);
        $this->set('ratingInfo', $stories_array);
}

Now I would like to truncate (or make an excerpt of) the plot
variable. I've read a ticket on makings exerpts (https://
trac.cakephp.org/ticket/2306), but I don't quite understand how to
implement it.

Could someone help me? Thanks!

--~--~---------~--~----~------------~-------~--~----~
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