Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to get "true" current document #30

Open
roryaherne opened this issue Jan 25, 2023 · 0 comments
Open

How to get "true" current document #30

roryaherne opened this issue Jan 25, 2023 · 0 comments

Comments

@roryaherne
Copy link

roryaherne commented Jan 25, 2023

Hi Trevor,

Is there any way to get the "true" current document when using this?

I have a navigation widget component that the editors add to "/masterpage/header" similar to the BaseLine project. For this widget I need the document that's calling the PartialWidgetPage.

<inlinewidgetpage documentid="@headerDoc.DocumentID" initialize-document-prior="true">
     <vc:master-page-header />
</inlinewidgetpage>

Where MasterPagHeaderViewComponent is the same as your HeaderViewComponent in the BaseLine project.

If I'm on for example "/home" or "/about", it always returns the location of the nested page (eg "/masterpage/header").

I guess as a work around I would check if the current doc is of MasterPageHeader doc type and if so, try to retrieve the "true" current doc using the current url.

Thanks,

Rory

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant