Say I had a VisualForce page with 3 links, is there a way to navigate to another VF page with a tabpanel and specify which tab I'd like shown on page load? Is there a way to do this natively or should I use a URL param or something to specify?

Some websites allow navigation to elements by doing things like


and clicking the links redirects to the specified element in the URL. Can I do this?

  • 1
    Bootstrap support uses them to focus on a specific section of the page. I can suggest something if you are using bootstrap. – Salesforcesmarty Dec 9 '15 at 13:05
 <apex:outputLink value="{!$Page.calypso_latest_news}?cat=press releases">Press releases</apex:outputLink></li> 

I think I've had the same problem before We have news section where it renders to different categories e.g. Events, press releases and I use the link above to render it.
There is also a different thing you can do on the vf page in order to display different information, specific for different categories

<apex:outputText value="Product launches" rendered="{!$CurrentPage.parameters.cat='product launches'}" />
<apex:outputText value="Events" rendered="{!$CurrentPage.parameters.cat='events'}" />

<apex:outputText value="Find out the latest about" rendered="{!$CurrentPage.parameters.cat='press releases'}" />
<apex:outputText value="Incident Updates" rendered="{!$CurrentPage.parameters.cat='incident updates'}" />**

So if you have 3 tabs you can put

  <apex:outputLink value="{!$Page.Tab1}?cat=info1 ">Tab1</apex:outputLink></li>
  <apex:outputLink value="{!$Page.Tab1}?cat=info2 ">tab2</apex:outputLink></li>
  <apex:outputLink value="{!$Page.Tab1}?cat=info3 ">Tab3</apex:outputLink></li> 

And render information using

<apex:outputText value="Some Info Here" rendered="{!$CurrentPage.parameters.cat='info1'}" /> 
| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy