I’m having a little bit of hugo-writer’s block at the moment. I know the answer to this is simple but I can’t remember how to do it.
Say I have a layout for a bunch of events as follows:
content/events/foo/index.md
content/events/foo/registration/index.md
content/events/foo/programme/index.md
etc. etc.
How can I enumerate the immediate direct sub-folders of content/events/foo/, so that on the parent content/events/foo/index.md I can have a list of links to event-specific related information.
I know this is done at theme template level, but I just can’t think how at the moment !
I think the thing that was/is confusing me is the whole “branch bundle is a list” thing, because I’m using the branch bundle as a category rather than, e.g. list of blog entries. So thinking of it as a list is a bit odd mentally.
However, I guess as you say, using a list template you can ultimately make it look like a single page anyway.
Slight problem, having changed index.md to _index.md, a previous layout on a higher level page is now broken as it was using where .Site.RegularPages "Type" "events" as a test and obviously cannot display foo any more as foo is no longer a regular page.
Bit tricky to share a repo as it contains all sort of stuff I’d have to spend an eternity stripping out, however here is a bigger snippet that should hopefully make it clearer ?
This is located on the homepage, and so current/upcoming events are displayed (eventShowUpcoming set in the index.md of the events subfolder) but other stuff is not.
At the moment what is under events is a purely academic question, because the site is very much under design, so it can contain (or not contain) whatever you think it should !
git clone --single-branch -b hugo-forum-topic-48288 https://github.com/jmooring/hugo-testing hugo-forum-topic-48288
cd hugo-forum-topic-48288
hugo server
Not to put too sharp an edge on this, but I cannot spend any more time without access to your repository. Guessing is not a wise usage of my time or yours.