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

Add an ancestor condition that looks beyond the direct parent. #2071

Closed
jordandukart opened this issue Mar 30, 2022 · 3 comments
Closed

Add an ancestor condition that looks beyond the direct parent. #2071

jordandukart opened this issue Mar 30, 2022 · 3 comments
Labels
Type: feature request a proposal for a new feature in the software (should be justified by a ‘use case’)

Comments

@jordandukart
Copy link
Member

https://github.com/Islandora/islandora/blob/2.x/src/Plugin/Condition/NodeHasParent.php exists which looks at a direct parent, it'd be nice to do this on the ancestor chain. PR to come.

@jordandukart jordandukart added the Type: feature request a proposal for a new feature in the software (should be justified by a ‘use case’) label Mar 30, 2022
@seth-shaw-unlv
Copy link
Contributor

Could this be a separate condition, e.g. NodeHasAncestor, in case the site really does want to just check the parent? Either that or a condition configuration to expand the search up the hierarchy?

@jordandukart
Copy link
Member Author

After chatting in Slack with @seth-shaw-unlv, re-worked it to be a helper in utils as well as updating islandora_breadcrumbs to leverage it to DRY things up.

@jordandukart
Copy link
Member Author

Closing as the PR is merged.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Type: feature request a proposal for a new feature in the software (should be justified by a ‘use case’)
Projects
Development

No branches or pull requests

2 participants