You need to sign in to do that
Don't have an account?
How to set urls porperly in Saleforce Force.com site?
in my pages i have several links to another visualforce pages in developer edition I used hard coded links such like this:
<apex:outputLink value="https://c.eu6.visual.force.com/apex/gindex" id="theLink">Back to shop</apex:outputLink>
On controller side
Public PageReference backToPage(){ return new PageReference('/apex/gindex'); }
How to set them properly in force.com site?
You can use {!$Site.pageName} when working with the output or command links on visualforce pages.Where pageName denotes the name of your page ( in your case it is gIndex).
Your controller seems to be correct.
On your Site's Public Access Setting make sure the visualforce page gindex is assinged under Visualforce Pages Section.
All Answers
Create an action function like below: And update the link like this: Let me know if this helps you.
Thanks,
Neetu
Sorry, maybe I have not clarified it fully. I mean Are that redirects will work when I will download my pages on force.com site?
If you add permissions for these visualforce pages in your force.com site, then it will work fine.
Let me know if this helps you.
Thanks,
Neetu
You can use {!$Site.pageName} when working with the output or command links on visualforce pages.Where pageName denotes the name of your page ( in your case it is gIndex).
Your controller seems to be correct.
On your Site's Public Access Setting make sure the visualforce page gindex is assinged under Visualforce Pages Section.