0

limiting the amount of words/characters in item:description

Hello I would like to limit the output of the in the feed - so all our item visually look the same - I cant seem to find a word count filter syntax way of doing this - please help... thanks! R http://test.callison.com/index.php/news - you'll notice that some have a lot more text than others - would like to keep it the height of the image if possible

by
6 Replies
  • You're probably better off working with characters than with words. This should pretty much do what you want - Add a Regex rule In [item.description] replace [^([^>]+>.{80}.?)\b.] with [$1] Omit all outer []s. You will need to tinker with the value of 80.

    0
  • cool - ty - Ill give it a try

    0
  • You're probably better off working with characters than with words. This should pretty much do what you want - Add a Regex rule

    In [item.description] replace [^([^>]+>.{80}.?)\b.] with [$1]

    Omit all outer []s.

    You will need to tinker with the value of 80.

    Hopefully that makes things a little clearer.

    0
  • So the star symbol does not work in this forum. In the following please replace 'star' with the star symbol:

    In [item.description] replace [^([^>]+>.{80}.star?)\b.star] with [$1]

    0
  • [item.description] replace [^([^>]+>.{80}.?)\b.] with [$1]

    and

    item.description] replace [^([^>]+>.{80}.*?)\b.*] with [$1]
    
    2
  • In the past I have had Regex fail with item.descriptions > 200k, or was it 17,500 characters. Processing would simply bypass my regex.

    0

Recent Posts

in Pipes