http://book.cakephp.org/view/1625/truncate
this is the solution and a great one.
On Jan 3, 8:25 pm, Zeu5 <kimc...@gmail.com> wrote:
> Hi there,
>
> i have a cake webapp that includes a blog.
>
> the body of the blog posts uses tinymce so i can put in some HTML
> coding for the body of the post.
>
> At the index page of the blog, i do a posts/index which uses
> paginate(). Straight forward enough.
>
> here comes the problem.
>
> at the index, i am displaying something like 25 posts per page.
>
> i want to display a shortened summary of the body of each post.
>
> there are 2 ways to do a substr.
>
> 1 way is at the paginate and use the sql code to do the substr. but i
> do not know how to get it to work with cakephp paginate
>
> another way is that the paginate retrieves the entire body of the post
> and then i use php substr function at the index.ctp.
>
> both seem not ideal when dealing with tinymce'd description.
>
> Please advise.
Check out the new CakePHP Questions site http://cakeqs.org and help others with their CakePHP related questions.
You received this message because you are subscribed to the Google Groups "CakePHP" group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to
cake-php+unsubscribe@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php?hl=en
No comments:
Post a Comment