limit number of words in template?

limit number of words in template?

Thursday 05 June 2003 12:38:25 am - 1 reply

Author Message

Bård Farstad

Thursday 05 June 2003 1:10:50 am

To do this you need a template operator to truncate the text after n number of words.

E.g.
{"This is my text with alot of words"|wordtrunc(4)}

The wordtrunc operator would parse the text and remove everything after the first 4 words.

PS: the wordtrunc operator needs to be written. You can use the RAD tool in eZ publish 3.1 to generate the basic class.

-bård

Documentation: http://ez.no/doc

You must be logged in to post messages in this topic!

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