Gil Ronen Posted April 9, 2017 Share Posted April 9, 2017 I want to make a template for the record feed that contains only the first ~50 words of the article, not the full text. I know I can do {$record->truncated()|raw} To get the entire record text, but can I get only a part of it? Thanks. Link to comment Share on other sites More sharing options...
opentype Posted April 9, 2017 Share Posted April 9, 2017 So where exactly do you want to cut? After x characters? One paragraph? Can it cut words? …? I recently used something like this to cut the text for meta tags. {{$previewtext=mb_substr(strip_tags($record->truncated()),0,255);}} {$previewtext} Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.