1
H-hich
Limit number of caractere in a block
  • 2010/5/4 20:06

  • H-hich

  • Just popping in

  • Posts: 18

  • Since: 2008/7/31


Hi,

I'd like to limit number of caractere for some blocks like "recent comment"

For some blocks there is on option in the admin, but for two blocks (recent comment and the last post in CBB3.08) don't have that option?!

For a better look of my home, I'd like to be sure that in this two blocks I will never 2 line for à comment.

Sorry for my english ^^


2
red_Slider
Re: Limit number of caractere in a block

to limit characters to 300:

<{$block.content|truncate:300}>

3
H-hich
Re: Limit number of caractere in a block
  • 2010/5/4 21:22

  • H-hich

  • Just popping in

  • Posts: 18

  • Since: 2008/7/31


Works fine, Thanks a lot !

That solution limite in octect/byte ? and every letter doesn't take the same size ?

4
red_Slider
Re: Limit number of caractere in a block

I'm not sure about that, but try this:
<{.substr($block.content,0,300)}>

or see this link

Login

Who's Online

205 user(s) are online (56 user(s) are browsing Support Forums)


Members: 0


Guests: 205


more...

Donat-O-Meter

Stats
Goal: $100.00
Due Date: Mar 31
Gross Amount: $0.00
Net Balance: $0.00
Left to go: $100.00
Make donations with PayPal!

Latest GitHub Commits