Accessing Section object from Page

According to, a {{.Section}} variable is provided to a page.

But this seems to be only a “string”. So I cannot actually call {{.Section.Title}} on this.

I tried using {{.Site.Sections}} but it’s a slice/array (not a map, keyed by this {{.Section}} string) so iterating over it seems like a bad implementation.

Is there a way to access the “section” object of a page from the template of the page?

Have a look at .GetPage and set the Kind argument to "section".

The previous answer isn’t what you are looking for (I think).

I recommend reading the docs on sections, and not just the headline. Your answer is there.

The answer seems to be {{.CurrentSection}} page variable, I did not see this initially (and assumed {{.Section}} would be that).