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

Option to get taxonomies of all descendant pages #43

Open
wants to merge 2 commits into
base: develop
Choose a base branch
from

Conversation

chraebsli
Copy link

@chraebsli chraebsli commented Oct 8, 2024

This PR adds the option to not only get the taxonomies of the children of a page, but also to get it from all descendants. This makes it possible to use the taxonomy list plugin on complex blog pages too.

To use it, just replace taxonomylist.getChildPagesTags() with taxonomylist.getDescendantPagesTags(), and you should get taxonomies of all descendant pages.


closes #42
closes #35

@pmoreno-rodriguez
Copy link

Hi. What's the differences between your PR and this one.

@chraebsli
Copy link
Author

I haven't seen the one. His PR is very similar to mine, but his will make the changes to the existing function with additional parameters. Mine is another whole function. His is recursive, it loops through the pages, mine gets the pages directly via Grav, similar to the descendants collection.

I'm not very familiar with PHP, so I don't know which method is better. But either way, I think this or his PR should be merged, since it adds an important functionality to Grav.

@rhukster
Copy link
Member

I’m on vacation this week but will look at this and the other PR when I’m back. Thanks!

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

Successfully merging this pull request may close these issues.

Feature Request: Option to get Descendant Pages Feature Request: getChildPagesTagsRecursive()
3 participants