XF 1.5 Using CSS, how to trim Thread Title after a certain length with "..."

Neutral Singh

Well-known member
Say after like 35 characters, the title display is replaced by ... at the end of the title. How?

I guess, this css needs some modifications...

HTML:
.discussionListItem .title {
  font-size: 10.5pt;
  word-wrap: break-word;
}

i tried putting this in above CSS but it did not work....

HTML:
text-overflow: ellipsis;
max-width: 100%;
display: block;
overflow: hidden;
 
The ellipsis will be applied for the overflow condition.

If you want to trim the title to 35 characters and automatically apply ellipsis, you can use the wordtrim helper, like so:
HTML:
{xen:helper wordtrim, $thread.title, 35}
 
The ellipsis will be applied for the overflow condition.

If you want to trim the title to 35 characters and automatically apply ellipsis, you can use the wordtrim helper, like so:
HTML:
{xen:helper wordtrim, $thread.title, 35}
Hi Brogan and @Neutral Singh

I want to achieve this in XF2. Which template is used to include the
Code:
{xen:helper wordtrim, $thread.title, 35}
 
Top Bottom