Currently, we can do .Param "foo.bar"
to get the page param foo.bar
, or, if that doesn’t exist, then the site param foo.bar
, if it exists, or nil otherwise.
If we want to get all the “merged” parameters nested in the same place, we have to do it individually:
$bar := .Param "foo.bar"
$baz := .Param "foo.baz"
It would be useful to be able to be able to collect all the merged parameters nested under the same parameter “path”:
$foo := .Merged "foo"
$bar := $foo.bar
$baz := $foo.baz
It would be even more useful if we could use normal map accessor syntax:
$foo := .Merged.foo
$bar := $foo.bar
$baz := $foo.baz
$bez := .Merged.bez
In my case, this would be useful when using a partial template that accepts the same config map from two different places in the config tree, e.g. article
(containing title_font_size
) and article_list
(containing title_font_size
).