Do you have some feature in mind that you'd love to see in Couch? Let us know.
5 posts Page 1 of 1
Currently the excerpt tag can limit the amount of text displayed by word count using the 'count' parameter. This is for example particularly appropriate for news article summaries, but not news titles. Would you please consider adding a parameter that would allow for displaying the excerpt text by character count instead? Unless I am mistaken, this capability currently does not exist within couch. I currently find myself needing this feature to display the titles of news items and products. I do not want these titles to go onto a second line and no number that I input for word count would be appropriate for the variety of titles used.
Hi cheesypoof,

I've just discovered your post on this - I actually just posted a feature request for this exact requirement, for the same reasons, less than a minute ago.

Hope to see it soon, it should not be too difficult to implement, If i was capable of doing it myself I would.
Hi Patrick,

This issue has already been addressed.
The 'excerpt' tag (http://www.couchcms.com/docs/tags-refer ... cerpt.html) supports a 'truncate_chars' parameter which when set to '1' will make the tag apply the 'count' parameter to characters (instead of words as it does by default). For example, the following will return 100 characters
Code: Select all
<cms:excerpt count='100' truncate_chars='1'>...blah blah...</cms:excerpt>
I thought I would point out, for single line text this can actually be more optimally accomplished with CSS:
Code: Select all
.truncate {
   overflow: hidden;
   white-space: nowrap;
   text-overflow: ellipsis;
}
Thanks KK - works perfectly.

cheesypoof - as you say for Headings this might be ok but not excerpt text on multilines - it would still require fixing heights on elements then hiding the overflow as you suggest, however I want to avoid height setting as it just means more @media queries in responsive layouts, and a knock on of adjustments if font sizes etc are altered.
5 posts Page 1 of 1
cron