0

I am trying to use LWC Navigation to community page. I Understand we have to give Page Name. My question is where can I get Page Name and how can I get the page name if it is under an hierarchy.

 this[NavigationMixin.Navigate]({
            type: 'comm__namedPage',
            attributes: {
                pageName: 'my-page'
            },
            state: {
                labelKey: labelKeyVal,
                language:'en_US'
            }
        });

enter image description here

1 Answer 1

1

I figured it out. We have to use name instead of pageName and we have to use My_Page__c

[NavigationMixin.Navigate]({
            type: 'comm__namedPage',
            attributes: {
                name: 'My_Page__c'
            },
            state: {
                labelKey: labelKeyVal,
                language:'en_US'
            }
        });
1
  • Thanks; helped me figure out my issue. Realized the __c is required on the page name. Commented Jan 7, 2022 at 16:58

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .