Hello,
Writing a layout, I need to dynamically access the menu named .Params.id
inside .Site.Menus
.
How to do that? I would like to do something like
{{- with .Site.Menus.$.Params.id -}}
for instance.
Thank you by advance!
Hello,
Writing a layout, I need to dynamically access the menu named .Params.id
inside .Site.Menus
.
How to do that? I would like to do something like
{{- with .Site.Menus.$.Params.id -}}
for instance.
Thank you by advance!
{{- if isset $.Site.Menus .Params.id -}}
Or if you need value
{{- index $.Site.Menus .Params.id -}}
Thanks a lot. I’ll look into this!