Hi!
We know we can get the refId for a given request at valve level by doing
valveContext.getRequestContext().getResolvedSiteMapItem().getHstSiteMapItem().getRefId()
but that applies in the context of the the current request being processed.
What if I wanted to know the refId of another url that is not the one currently being processed by the valve, by having its url?
For instance, for the next request:
We would like to get the refId of the url passed in the targetUrl parameter, and NOT the one for the first part of the URL.
This gets particularly tricky as the targetUrl parameter could be in a sitemap that is defined in a configuration that is not the same where mypage
is declared.
Asked more technically:
Is there any way to programmatically get all the sitemaps declared in all the configurations of my project and use a SitemapMatcher or similar to find the SiteMapItem that matches the targetUrl value so we can get the refId of THAT SiteMapItem?
Thanks in advance