Skip to content

PageContextRepository.GetCurrentPageAsync() returns inlinewidgetpage url #21

@roryaherne

Description

@roryaherne

Hi Trevor,

If I call PageContextRepository.GetCurrentPageAsync() inside the header component, I get /master/header.

Is there a way to get the TreeNode or PageIdentity for the page the client is actually calling (eg /about-us , /home, etc)?

I was thinking that alternative urls would mean that I can't rely on the relative path being the NodeAliasPath.

The reason I need is I want to build a language selector into my Navbar which needs the current nodealiaspath in order to generate the link for the other language version of that page. Though I could imagine there are plenty of scenarios where the node requested by the client is needed in an inlinewidgetpage.

Thanks,

Rory

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions