localgovdrupal / localgov_subsites_extras

Create menu-driven subsites. Add any content to a subsite and generate a menu to navigate to it.
GNU General Public License v2.0
1 stars 0 forks source link

Better path alias for Subsite child pages #27

Closed Adnan-cds closed 2 months ago

Adnan-cds commented 3 months ago

What does this change?

Currently, path aliases of child pages of Subsites are missing the Subsite homepage's path alias. This breaks breadcrumbs. This is particularly evident when Service pages are used child pages. For example, if a Service page called "Child" is added to a Subsite homepage called "Parent", the child page still gets a path alias of /child. This change ensures that child pages get path aliases of the /parent/child format.

How to test

finnlewis commented 3 months ago

Not had a chance to test this and less familiar with this module. @rupertj any time to give it a review?

finnlewis commented 2 months ago

Still keen to make time to test this, but not had a chance.

rupertj commented 2 months ago

Me too!

rupertj commented 2 months ago

I've been manually testing this. So far I've:

This looks like it's working perfectly to me. I'd like it to have test coverage though.

Edit: It has test coverage already. I missed that somehow!

rupertj commented 2 months ago

And just to check for regressions, a guide created outside of the subsite called "Some other guide" got the alias "/some-other-guide" like normal.

Adnan-cds commented 2 months ago

Thank you.