How to display short text/excerpt?

I’ve got a list of tiddlers in a table. It would be nice to show the first few words of the text, if for no other reason to show which ones have content and which ones don’t. I’m coming up blank looking for how to do this in the docs; I might just not know the right terms to look for.

I guess I could get the first few words with filter magic, involving splitting on words, taking the first N words, and joining them with spaces. Just wondering if there’s a simpler way to go.

I think that’s the way to go. Possibly like

<$list filter="[[I have some things to say]splitregexp[\b]trim[]!is[blank]limit[5]join[ ]]">

</$list>
1 Like

Preview or abstract may be the terms that relate to this.

In the past if there is a text field I display an icon, whose tooltip “previews” the content of the text field, but it could also show the whole content.

This also tells you if the tiddler contains content, because if it does not, you are free to delete it without opening it, and loosing content.

Maybe the trick is to display it all unless the length of the text field exceeds a certain number of characters. When you do truncate just do it based on splitregexp(\n] for a fixed number of paragraphs rows. Then the user may intentionally put an overview in the first paragraph.

1 Like

Thanks for both these replies.