Issue getting current page path in a nested experience fragment
Hi,
We have a use-case in a component, where we're using nested experience fragments on a page and when I try to get the current page path in a component (nested inside the innermost XF), the get the path of it's parent XF.
For example, we have two XFs - Child XF (/content/experience-fragment/project/child-xf) and Parent XF (/content/experience-fragment/project/parent-xf). And a Test Page (/content/project/test-page), where Parent XF is being rendered via 'Experience Fragment' component.
Now, in Parent XF, the condition to render Child XF is checkbox controlled. And the component used in Parent XF is a react-based component, which will make a simple GET request to Child XF path and render the response HTML on the page. This is leading to the component inside Child XF consider the Parent XF as it's current page. As in, injecting current page in the inner-most component is giving path as '/content/experience-fragment/project/child-xf' instead of '/content/project/test-page'.
We have another use-case, involving Building Blocks, which is working out well for us in fetching current path details. Not sure, what went wrong in the above implementation.
Any leads in debugging the issue is appreciated. Thanks!
