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

Create parent relationship when adding a page to a Service Landing Page or Service sub-landing page #196

Open
keelanfh opened this issue Jan 20, 2023 · 4 comments
Labels
enhancement New feature or request

Comments

@keelanfh
Copy link
Member

Currently, when you have a Service Page and you then add that page as a child page of a Service Landing Page, it does not automatically create the parent relationship. This means that you have to remember to go into the Service Landing Page and create the relationship. Not doing this can mean that pages have missing breadcrumbs, which gets in the way of navigation.

How I'd imagine this working is something like:

Given I have created a Service Page
And the Service Page has no parent set
When I add the Service Page as a child page to a Service Landing Page or Service Sub-landing Page
Then the Service Landing Page or Service Sub-landing Page is set as the parent of the Service Page

This could be extended to other content types too.

I have kept the scenario intentionally quite narrow - you'd only want to do this where the Service Page didn't already have a parent, since one Service Page might appear in multiple Service Landing Pages. Similarly, you wouldn't expect a Service Page to be added to a Service Landing Page simply because you added a parent.

Not sure how feasible this would be?

@keelanfh keelanfh added the enhancement New feature or request label Jan 20, 2023
@andybroomfield
Copy link
Contributor

... maybe?
Theres a possibility (rare, but does happen) where an internal page from another service or section is directly referenced on the landing or sublanding page, or for whatever reason the page being referenced should be kept standalone. It could be worked around by undoing the link after a page save, but if that had to be done repeatedly after each page safe, could cause issues.

Generally the workflow tends to be create the page and specify the parent, and then add it to the landing page, though that is where the confusion happens. I would suggest the feature works the other way round, that adding a landing page as a parent should automatically add it to the landing page, with options to then hide it or remove it.

Longer term, I was thinking we should look at whether there is a better linking structure to maintain the page linkages and IA, maybe adopting entity hierarchy module that subsites uses?

@keelanfh
Copy link
Member Author

Sounds like this is a bit more complex than I first thought! There's something to be said for having a reasonable default with the ability to override when required - and hopefully having that persist through page edits in future, rather than needing to be done each time.

@ekes
Copy link
Member

ekes commented Jan 23, 2023

Generally the workflow tends to be create the page and specify the parent, and then add it to the landing page, though that is where the confusion happens. I would suggest the feature works the other way round, that adding a landing page as a parent should automatically add it to the landing page, with options to then hide it or remove it.

This was very much the workflow that was understood when we refactored the code. The problem about automating it was the placement. It's not even just the order, but that there are multiple fields (entity reference and cta link) that the editor could choose to place them into. Hence the (it never got themed) drag and drop javascript for showing ('orphaned' pages) and enabling them into dropped into desired location.

@keelanfh
Copy link
Member Author

The problem about automating it was the placement. It's not even just the order, but that there are multiple fields (entity reference and cta link) that the editor could choose to place them into.

This is why I thought doing it the other way round could work better - if you're adding a child page, it seems fairly likely that you'd want to add the current page as a parent, if it doesn't already have one. I can't think of an example where we wouldn't want that to happen, though I can ask our content designers. Ideally, you might want to do it both ways round - though there are lots of corner cases that make this complicated.

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

No branches or pull requests

3 participants