I’m trying to modify the children shortcode from Learn/docdock to filter on sections under a particular level. For example, I have the following:
content └── animals ├── _index.html ├── cat │ ├── _index.html │ ├── persian │ │ └── _index.html │ └── tabby │ └── _index.htm └── dog ├── _index.html ├── husky │ └── _index.html └── poodle └── _index.html
And I want to add a short code to
content/animals/_index.html to filter and only process “dog” pages for instance. If I reference
.Section for each page in a range I get
animals which I expect.
When I try to use
.CurrentSection, which I interpret as the current section for the page being processed, it returns a page object for that page. For the same page,
.Kind returns “section”, so I’m stumped as to how to get the current section for “dog”, and then when I process those sub pages get “husky” and “poodle”.
I’m pretty sure there is something fundamental I’m missing, so any insights for how to get the current section would be appreciated!