New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add .Param func on Node and Page #1462

Closed
bep opened this Issue Sep 28, 2015 · 0 comments

Comments

Projects
None yet
1 participant
@bep
Member

bep commented Sep 28, 2015

.Param(string)

  • Page: Returns .Params if found, else lookup in .Site.Params
  • Node: Lookup in .Site.Params

Common use case:

{{ .Param "description" }}

See http://discuss.gohugo.io/t/setting-params-on-homepage/1770/3

@bep bep added the Enhancement label Sep 28, 2015

@bep bep closed this in 078fad4 Oct 12, 2015

bep added a commit that referenced this issue Oct 12, 2015

bep added a commit that referenced this issue Oct 12, 2015

bramp added a commit to bramp/hugo that referenced this issue Dec 17, 2015

Add Param(key) to Node and Page
This  is a convenience method to do lookups in Page's (Page only)  and Site's Params map (Page and Node), in that order.

Fixes #1462

bramp added a commit to bramp/hugo that referenced this issue Dec 17, 2015

bramp added a commit to bramp/hugo that referenced this issue Dec 17, 2015

tychoish added a commit to tychoish/hugo that referenced this issue Aug 13, 2017

Add Param(key) to Node and Page
This  is a convenience method to do lookups in Page's (Page only)  and Site's Params map (Page and Node), in that order.

Fixes #1462

tychoish added a commit to tychoish/hugo that referenced this issue Aug 13, 2017

tychoish added a commit to tychoish/hugo that referenced this issue Aug 13, 2017

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment