Monday, November 28, 2011

Re: limiting the character length of text I show in the view

If you know how many characters you need you can user the Text helper excerpt() method: http://book.cakephp.org/view/1469/Text

Jeremy Burns

On 28 Nov 2011, at 15:43, Tomfox Wiranata wrote:

Hi,

I am loading data in a div, that is often too short for the text
length...
so the text goes beyond my div... now I would like to limit the text
in my view. I guess its a CSS thing???

example:
I get: CakePHP is a great thing for building websites

I want: CakePHP is a great thing...


making a cut after x characters and clsing with three "."

thanks :)

--
Our newest site for the community: CakePHP Video Tutorials http://tv.cakephp.org
Check out the new CakePHP Questions site http://ask.cakephp.org and help others with their CakePHP related questions.


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

No comments: