Invision Community 4: SEO, prepare for v5 and dormant account notifications By Matt Monday at 02:04 PM
Gil Ronen Posted April 9, 2017 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.
opentype Posted April 9, 2017 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}
Recommended Posts
Archived
This topic is now archived and is closed to further replies.