Skip to content
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

Show Taxonomies with expansion to pages in Sidebar #447

Open
OrderdKaos opened this issue Aug 29, 2024 · 0 comments
Open

Show Taxonomies with expansion to pages in Sidebar #447

OrderdKaos opened this issue Aug 29, 2024 · 0 comments

Comments

@OrderdKaos
Copy link

Feature Description

As a theme user, I would like to be able to create taxonomies and have the /_default/list.html (or a /_default/terms.html) page in the theme automatically handle them by showing the Term and then open to the pages that include that Term.

Problem/Solution

The ability to support all defined taxonomies (built in and user defined) automatically.

Alternatives Considered

Creating a separate Sidebar, Creating the taxonomy in the content folder.

Additional Context

I was able to get this working, though it was an inelegant solution by:

  • overriding partials/sidebar.html
  • in the sidebar-tree section:
    * adding another union to $items so that {{ $items = union $items (.context.Data.Pages) }}
    * inside the loop adding a check for the page kind and if Term, then ranging over all implementing sub pages

Another option I was exploring was to break the sidebar-tree section out into sub-partials based on page kind and then calling based on that.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant