You need to sign in to do that
Don't have an account?
ram2force
how to give link from Site page to visual force page
I have created a visual force page(using setup>Develop>pages) and add this page to my site(using Develop>sites>MysiteName>Site visualforce pages>Edit>add and save my visualforce page).
Visual force page:
<apex:page > <!-- Begin Default Content REMOVE THIS --> <h1>Congratulations</h1> This is your new Page <!-- End Default Content REMOVE THIS --> </apex:page>
Then I have added Active site page of my site as, SiteTemplate. The coding of site template is below.
Site Template:
<apex:page showHeader="false" id="SiteTemplate"> <apex:stylesheet value="{!URLFOR($Resource.SiteSamples, 'SiteStyles.css')}"/> <apex:insert name="header"> </apex:insert> <apex:insert name="body">
<h1>My First Website<h1>
<a href="???">My Congratulations page</a>
</apex:insert>
<apex:insert name="footer">
<hr/>
<c:SiteFooter />
<site:googleAnalyticsTracking />
</apex:insert>
</apex:page>
My need is, If click on "My congratulations page" in my site page.....the Visual force page "Congratulations" should show......How to do this????......
Please clear my issue.......
if you are in a Force.com site and your visualforce page called "Hello" is also available to the site, you should just be able to use the page name as is.
Do any of the following work for you:
All Answers
You should just be able to refer to the page name (I tend to use ../ as it handles the case where my site isn't at the root directory level) :
could you please provide any sample path the link of the visualforce page......
like, href= " .....???...../Congratulations"
I tried like, but it is not working.......
<a href="/hello">My link to Hello page</a>
if you are in a Force.com site and your visualforce page called "Hello" is also available to the site, you should just be able to use the page name as is.
Do any of the following work for you:
Thank you very much Mr.Bob...First one is worked Accurately...........Similar way I can add Add visual force pages to my site and give link to that page unlimited.....is it correct...........Thank you....
I think so, assuming I'm understanding you correctly. You can use this for any pages that are available to your site.
hey u can also do like
<a href="/<Site Label>/<UR VF page name>"
give it a try
when using PageReference do like
new PageReference('/<Ur VF page name>')
Why would you not use the $Page global variable?