From 2a58653f21a831e523bd6bdd6db610887eb6890c Mon Sep 17 00:00:00 2001 From: Christopher Zavatchen Date: Mon, 22 Feb 2021 13:22:22 -0500 Subject: [PATCH] Fixes problem if "excerpt" is blank (#31) Fixes problem where if "excerpt" is blank, the first 160 characters of "content" are not displayed. This is related to "Null Coalescence doesn't return fallback if falsey variable uses a modifier #2022" issue located at https://github.com/statamic/cms/issues/2022 --- resources/views/home.antlers.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/resources/views/home.antlers.html b/resources/views/home.antlers.html index 4de775c..13f44d3 100644 --- a/resources/views/home.antlers.html +++ b/resources/views/home.antlers.html @@ -20,7 +20,7 @@

{{ date }} — - {{ excerpt | widont ?? content | strip_tags | safe_truncate:160:...}} + {{ excerpt ? excerpt | widont : content | strip_tags | safe_truncate:160:...}}

{{ /articles }}