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

fix: made CMSEditLinkExtension work with Hierarchy, added dynamic get… #1630

Conversation

tiller1010
Copy link

@tiller1010 tiller1010 commented Dec 1, 2023

…CMSEditOwnerRelation method

Closes #1628

  • create a has_many relationship on a dataobject with a dataobject that uses the Hierarchy extension: CMSEditLinkExtension doesn't work with Hierarchy #1628 (comment)
  • add a cms field to your Hierarchy dataobject to set the ParentID
  • confirm saving the dataobject after changing the parentid properly redirects you to the cms edit link

@tiller1010 tiller1010 changed the base branch from 2 to 1.13 December 1, 2023 18:54
@GuySartorelli
Copy link
Member

Tha k you contributing - however based on the information in the original issue, this does work correctly with the hierarchy extension, but doesn't support having different parents. I don't think we want support for that at this level. Instead, the getCMSEditOwner() method should be overridden dynamically return the correct owner based on project logic.

@tiller1010
Copy link
Author

based on the information in the original issue, this does work correctly with the hierarchy extension

No, this PR calls AllChildren() instead of hasMany for Hierarchy relations.

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.

CMSEditLinkExtension doesn't work with Hierarchy
2 participants