Well, if your stories are plain text data, you need to use TextHelper
(http://api.cakephp.org/1.2/class_text_helper.html) in your view. The
ticket you posted is a patch for making excerpts of html data.

Toon Gorissen wrote:
> 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