mirror of
https://github.com/gohugoio/hugo.git
synced 2024-11-14 20:37:55 -05:00
b9bd35d72e
git-subtree-dir: docs git-subtree-split: fdea5430f89dfd849d39212abdf5ace0a4763e5a
1.1 KiB
1.1 KiB
title | linktitle | description | godocref | date | publishdate | lastmod | categories | menu | keywords | signature | workson | hugoversion | relatedfuncs | deprecated | aliases | |||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
isset | isset | Returns true if the parameter is set. | 2017-02-01 | 2017-02-01 | 2017-02-01 |
|
|
|
false |
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 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
.
This restriction also applies when accessing page-level front matter keys from within shortcodes.
{{% /warning %}}