From 58029627df29c1c316c13ebb0e582a3664856deb Mon Sep 17 00:00:00 2001 From: Joe Mooring Date: Sat, 22 Aug 2020 20:21:28 -0400 Subject: [PATCH] Fix erroneous example code piping to if Fixes #1192 --- content/en/templates/shortcode-templates.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/content/en/templates/shortcode-templates.md b/content/en/templates/shortcode-templates.md index ac0de0ab2..19ec6dea9 100644 --- a/content/en/templates/shortcode-templates.md +++ b/content/en/templates/shortcode-templates.md @@ -95,7 +95,7 @@ For the second position, you would just use: most helpful when the condition depends on either of the values, or both: ``` -{{ or .Get "title" | .Get "alt" | if }} alt="{{ with .Get "alt"}}{{.}}{{else}}{{.Get "title"}}{{end}}"{{ end }} +{{ if or (.Get "title") (.Get "alt") }} alt="{{ with .Get "alt"}}{{.}}{{else}}{{.Get "title"}}{{end}}"{{ end }} ``` #### `.Inner`