We're using the wcm.io Navigation component from the wcm.io Core Components.
We noticed that the setting "navigation root" was replaced with the site root detection from Handler. This is fine, except when you configure something in the component, that is not the website root.
There seems to be no option to configure something else than the site root.
this was done by intention under the assumption that the configured site root in the handler context is always the root you want into the navigation component.
if we want to support also arbitrary root paths we need to somehow replicate all the "magic" logic currently embedded in the adobe navigation component impl
i wanted to avoid it. extending from that component is also not that easy as there is not method in the model's API to get only the configured (and resolved) root path.
but if you think this is an important need we might duplicate and add the logic anyways.
I’d say that this logic is indeed important: We use it for example to render the footer navigation (a subfolder of the site root), or the side navigation (i.e. the pages under a certain page).
So, yes, it would be very prefered to have it back, especially since the wcm.io Core Components should be a drop-in replacement for the Adobe Core Components.
Also, that funky logic (livecopy/blueprint/language copy/…) would be nice to have available generically: Maybe a good feature for one of the handler implementations? I’d like to call it from other components as well.
I can second this. We’re using the Adobe Core Components navigation component in a sidebar on for example an account page with a custom root page to display a certain page’s child pages.
Right now we can’t replace this component with the wcm.io Core Components because of this change.
this are good arguments - i will look into it and come up with an proposal, in a way that the logic can be reused outside the model impl classes as well.
i've implemented a simple but useful solution that relies on built-in wcm.io url handler functionality.
in version 1.4.2-2.10.0 (based on core componetns 2.10) the navigation component respects the (optional) navigation root. it can be set to a relative paths like tools/footer/meta-nav to use this relative to the site root as navigation root, or to an absolute path (which is rewritten to the current context).