You need to sign in to do that
Don't have an account?
Basant Kr Verma
How to pass parameters in custom Community Page
Hi Hive,
I am using Salesforce Communities (Napili template) and created a custom Community page for custom use
I want to have a page with some parameters as standard topic detail page having (/topic/:topicId/:topicName)
I want my page url to be like /customPage/:param1/:param2, but while creating page there is no option to set parameters.
Is there any way or work around for it ?
I already tried by setting query parameters (/customPage?param1=value¶m2=value) through javascript and read it in controller js but in this case these parameters are always there, they are not going away when we navigate to any other pages.
I am using Salesforce Communities (Napili template) and created a custom Community page for custom use
I want to have a page with some parameters as standard topic detail page having (/topic/:topicId/:topicName)
I want my page url to be like /customPage/:param1/:param2, but while creating page there is no option to set parameters.
Is there any way or work around for it ?
I already tried by setting query parameters (/customPage?param1=value¶m2=value) through javascript and read it in controller js but in this case these parameters are always there, they are not going away when we navigate to any other pages.
The other ways to naivgate is to use events available for navigation
All Answers
Take a dummy page to send parameters and redirect to that page.
Dummy page
<apex:page controller = '{!samplecontroller}' action = '{!onLoad}'>
</apex:page>
Controller :
public class samplecontroller
{
public samplecontroller()
{
}
public pagereference onLoad()
{
Pagereference originalpage = Page.pagename;
MyNewPage.getParameters().put('param1',value);
.........
return originalpage;
}
}
The other ways to naivgate is to use events available for navigation
https://success.salesforce.com/ideaView?id=0873A000000CLheQAG