You need to sign in to do that
Don't have an account?

Navigation Menu error in Community Builder when adding menu item
I'm having issues with adding a Menu Item to the Navigation Menu within Community Builder.
This is what I want: Add a menu item called "My Profile" and have it go directly to the User Profile page.
What's happening: The URL for My Profile requires one or more parameters. Please replace each parameter with the appropriate value.
Name: My Profile
Type: Community Page
Page: User Profile
URL: /profile/:recordId
Community Navigation Menu Parameter Error----https://help.salesforce.com/articleView?id=000233347&type=1
I had the kind of similar situation where I need to naigate to standrd object listview and the Menu type is Community Page..
URL parameter in the Napili Community is very confusing and I have better workaround to reslove the issue.
1- > Create a apex controller to get the logged in user profile
@AuraEnabled
public static Profile getLoggedInProfile() {
Profile loggedinUser = [SELECT Name FROM Profile WHERE Id = :UserInfo.getProfileId() LIMIT 1];
return loggedinUser;
}
2-> Create a Lightning Component and fire the event on page load/Refresh with Init event that uses force:navigateToSObject based on the Id from Step 1. This takes you to the Desiser Profile Page.
retunProfile: function(component, event, helper) {
var action = component.get("c.getLoggedInProfile");
action.setCallback(this, function(response) {
Var state = response.getState();
if (state === "SUCCESS") {
Var loggedInUser = response.getReturnValue();
Var navEvt = $A.get("e.force:navigateToSObject");
navEvt.setParams({
"recordId": loggedInUser.Id,
"slideDevName": "detail"
});
navEvt.fire();
}
});
$A.enqueueAction(action);
}
3-> The component will be kind of
<aura:component implements="forceCommunity:availableForAllPageTypes access="global" >
//You may add other desired attributes
<aura:handler name="init" value="{!this}" action="{!c.retunProfile}" />
</aura:component>
4-> Goto Napili Community Builder select newly created component from the drop down menu and publish.
I hope this should solve your issue.
--
Thanks,
Prashant
Did you get this solved? I also need to understand how to do this. It seems that in the lightning community, you can't pass values via URL dynamically.
Cheers
Please refresh the page and try again" when they are clicked.
The best solution still looks like build and deploy your own Lightning Components.
I am stuck here. did anyone find a solution to fix it as I don't want to hardcode the recordID, I want it to get picked as it gets picked for User Profile page for My Profile under Profile Menu.
Please help.
Thanks.
how can i diable the navigation bar
This is very illogical as I want to show respective profile page of logged in community users to the users and coding or creating component for such basic requirement is not productive
that you need to make it as "profile/home" in order for it to redirect to the user profile
If this answers your question please mark it as the best answer. Have a great day!
Just use "profile/Profile/Default" or "profile/Profile/home"
If not try "profile/Default" or "profile/home"
I got the proper solution.
Create a blank site page. Do not use any of the predefined one.
Use the components such as User Profile Summary.
Put this variable into the User ID parameter of the component: {!CurrentUser.id}
This way, the Url parameter is not relevant anymore.
Now you can use this Site Page on any desired Navigation Menu.
Note that if the user edit his own record, afterward it will redirect to the standard Record Detail Page