Skip to content

CurrentSection should navigate sideways for all branch nodes (also kind=taxonomy) #11815

Closed
@bep

Description

@bep

This issue is another part in an ongoing cleanup/consolidating job.

Given the below content tree, assuming that categories is defined as a taxonomy):

content
├── categories
│   └── _index.md
└── posts
    ├── _index.md
    └── p1.md

Current behaviour:

  • (site.GetPage "posts").CurrentSection == (site.GetPage "posts")
  • (site.GetPage "posts/p1").CurrentSection == (site.GetPage "posts")
  • (site.GetPage "categories").CurrentSection == site.Home

So, categories isn't defined as a section, but having it behave differently in this context, is confusing.

This also means that calling .FirstSection on a term page will return the root taxonomy node (and not the home page).

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions