Closed Wemago closed 5 months ago
This is because $site
actually represents the content root, and so page traversal is allowed even if the page parent is a Site
object. If you call $page->parent()->path()
you have the expected result.
Maybe the naming could be reviewed in Formwork 2.0, splitting Site from pages logic for good and also the content folder should be renamed to "pages".
I'm not afraid of breaking changes, as Formwork 1.0 is almost entirely rewritten.
Shouldn't $site->path() return the site folder path? Currently it's returning site content folder path.