• Chris Wilkinson 26
  • NEWBIE
  • 0 Points
  • Member since 2021

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 1
    Questions
  • 0
    Replies
Hello,

I've read and re-read the documentation around using the Navigation Mixin to browse to Community/Experience named pages and I can't get it to work.

I have dom element with a click handler that looks like this:
handleMenuItemClick() {
    console.log("Menu Item clicked: " + this.label + ", pageApiName:" + this.pageApiName);
    var pageRef = {
        type: 'comm__namedPage',
        attributes: {
            name: this.pageApiName
        },
    };
    
    console.log("pageRef: " +     JSON.stringify(pageRef));

    this[NavigationMixin.Navigate](pageRef);
}

The output of printing my PageReference object to the browser console is this:
{"type":"comm__namedPage","attributes":{"name":"Contact_Support"}}

I'm using the API name to identify the Contact Support page.  The documentation says this is supported:
https://developer.salesforce.com/docs/atlas.en-us.lightning.meta/lightning/components_navigation_page_definitions.htm

However, it doesn't work and I'm stumped.  Are there any examples how to use the Navigation Mixin to browse to the Contact Support, My Account or Account Management pages?

Thank you,

Chris