Skip to content

Is there a way to display the first word of a field? #4358

Answered by jasonvarga
kbarkhurst asked this question in Q&A
Discussion options

You must be logged in to vote
{{ var explode=" " first="true" }}

I would have suggested {{ var | explode:" " | first }} but it doesn't look like a space works in explode there.

Replies: 2 comments 3 replies

Comment options

You must be logged in to vote
1 reply
@kbarkhurst
Comment options

Answer selected by jackmcdade
Comment options

You must be logged in to vote
2 replies
@kbarkhurst
Comment options

@jasonvarga
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
3 participants