From 0c770e40be014ae87b1237a9a8ef9099a262bb7f Mon Sep 17 00:00:00 2001 From: Ryan Watters Date: Fri, 31 Mar 2017 18:46:14 -0500 Subject: [PATCH] Add warning to isset function for lowercase site config keys --- content/functions/isset.md | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/content/functions/isset.md b/content/functions/isset.md index 1e737dfe5..3757f54ef 100644 --- a/content/functions/isset.md +++ b/content/functions/isset.md @@ -17,10 +17,13 @@ deprecated: false aliases: [] --- -`isset` returns true if the parameter is set. -Takes either a slice, array or channel and an index or a map and a key as input. +`isset` returns true if the parameter is set. Takes either a slice, array, or channel and an index or a map and a key as input. ``` {{ if isset .Params "project_url" }} {{ index .Params "project_url" }}{{ end }} ``` +{{% warning %}} +All site-level configuration keys are stored as lower case. Therefore, a `myParam` key-value set in your [site configuration file](/getting-started/configuration/) needs to be accessed with `{{if isset .Site.Params "myparam"}}` and *not* with `{{if isset .Site.Params "myParam"}}`. Note that you can still access the same config key with `.Site.Params.myParam` *or* `.Site.Params.myparam`, for example, when using [`with`](/functions/with). +{{% /warning %}} +