Display first 100 chars

Author Message

David Jones

Wednesday 04 October 2006 4:34:25 am

I have an object with lots of text. I wont to display the first 100 chars of it rather than the whole thing.

I know I've seen this somewhere but I can't seem to find it now.

Could somebody point me in the right direction please.

Thanks

J-A Eberhard

Wednesday 04 October 2006 5:15:08 am

Use the template operator shorten

http://ez.no/doc/ez_publish/technical_manual/3_8/reference/template_operators/strings/shorten

Open Source Solution Provider
Open-Net Ltd Switzerland
http://www.open-net.ch

Xavier Dutoit

Wednesday 04 October 2006 8:35:27 am

This being said, beware if your attribute is an xml text, as you might cut it between the start end the end of the tag (eg: <b> Char n°100 </b> Would cut the text before the </b> and might seriously screw up your layout.

X+

http://www.sydesy.com

David Jones

Thursday 05 October 2006 12:51:13 am

Thats the one, I knew I'd seen it just couldn't remember what to serach for. I tried all sorts of things.

Anyway, Thanks guys.

Powered by eZ Publish™ CMS Open Source Web Content Management. Copyright © 1999-2014 eZ Systems AS (except where otherwise noted). All rights reserved.