Salesforce Navigation with Bootstrap, Visualforce and APEX

[easy-social-share counters=1 total_counter_pos="leftbig"]
Salesforce Navigation with Bootstrap, Visualforce and APEX

Visualforce provides a number of components out of the box to easily present your data to end users. Occasionally you may want to leverage a framework like Bootstrap and other third party libraries to create a pixel perfect experience.

How do you access navigation to include within the page? The following is a snippet that I used in a recent project and you may find useful to get kickstarted on your awesome UI!

Sample Result with Bootstrap


APEX – JMBDashboard.cls

public with sharing class JMBDashboard {

	// Code from
	// Get tab set describes for each app
	List tabSetDesc = Schema.describeTabs();

	public class TabLinks {
		public String linkname {
			get {return linkname; }
			set {linkname = value; }						
		public String linkurl {
			get {return linkurl; }
			set {linkurl = value; }						

	public static List getTabs() {
		List appTabs = new List();
		Schema.DescribeTabSetResult[] tabSetDesc = Schema.describeTabs();
		// Iterate through each tab set describe for each app and display the info
		for(DescribeTabSetResult tsr : tabSetDesc) {
		    String appLabel = tsr.getLabel();
		    System.debug('Label: ' + appLabel);
		    System.debug('Logo URL: ' + tsr.getLogoUrl());
		    System.debug('isSelected: ' + tsr.isSelected());
		    String ns = tsr.getNamespace();
		    if (ns == '') {
		        System.debug('The ' + appLabel + ' app has no namespace defined.');
		    else {
		        System.debug('Namespace: ' + ns);
		    // Display tab info for the Sales app
		    // replace with your app name here
		    if (appLabel == 'My Performance') {
		        List tabDesc = tsr.getTabs();
		        System.debug('-- Tab information for the Sales app --');
		        for(Schema.DescribeTabResult tr : tabDesc) {
		            TabLinks myDetail = new TabLinks();		            
		            myDetail.linkname = tr.getLabel();
		            myDetail.linkurl = tr.getUrl();
		        return appTabs;
		return appTabs;

Visualforce –

With a little bit of effort, you can leverage the “Fixed Top” navigation Bootstrap example by including the following between the ul tags (e.g. <ul class=”nav navbar-nav”>).


  • {!tab.linkname}
  • ...


    1. RashaGamal 4 years ago
    2. propackers820 4 years ago
    3. paperoni 3 years ago

      thanks .The snippet was of great help


    4. SachinAgarwal 3 years ago

      Packers and Movers Gurgaon –
      Packers and Movers Gurgaon Charges –
      Packers and Movers Gurgaon Rates –
      Packers and Movers Gurgaon List –
      Local Packers and Movers Gurgaon –
      Movers and Packers Gurgaon –
      Packers and Movers in Gurgaon –
      Movers and Packers in Gurgaon –
      Gurgaon Packers and Movers –
      Gurgaon Movers and Packers –
      Packers and Movers Gurgaon to Bangalore –
      Packers and Movers Gurgaon to Pune –
      Packers and Movers Gurgaon to Mumbai –
      Packers and Movers Gurgaon to Hyderabad –
      Packers and Movers Gurgaon to Kolkata –
      Packers and Movers Gurgaon to Chennai –

    5. marwam503 3 years ago

      شركة المدينة من افضل الشركات فى مجال التظيف الشامل بالمدينة المنورة كما
      انها تقوم بمكافحة الحشرات بالمدينة المنورة باعلى كفاءة ممكن وايضا نقل
      العفش من المدينة المنورة الى اي مكان

    6. sherazshazi 3 years ago

      It makes you a vibe thoroughly singing, dynamic, helped, and
      new for the length of the day.
      #If you wish to overhaul the appearance and soundness of
      your muscles then set the ahead of time said supplement with AndroNox which is a nitric oxide
      promoter. If you use these things together then you can expect speedier and
      whole plan happens. Regardless, before you use it essentially have an expedient
      look at the second supplement of this combo.
      Step 2-AndroNox
      Considered as a solid and a choice weight get prepared
      supplement, AndroNox affirmations to
      raise the diminished level of NO-nitric oxide in the body. The high NO level
      will help you to feel fortified and new for the length of the day allowing you
      to accumulate tore, balanced, and astounding structure. With the help of this
      supplement, you can truly save yourself from after-workout crashes. Additionally,
      it will help with speedier muscle change that you will achieve since couple of

    7. marykocha20 3 years ago

      Vasodilation [an expansion of the internal diameter of blood
      Increased blood flow to skeletal muscle
      Increased oxygen transport to skeletal muscle
      Increased delivery of nutrients to skeletal muscle
      Reduction in blood pressure.
      Increased strength and markedly improved stamina
      Extended muscular pump
      Signaling muscle growth and speeding recovery
      Target tissues saturated with more consistent levels of
      desired nutrients and extending benefits [over a 10 hour period]

    8. CynthiaLara 3 years ago

      Another thing I did find was one supposed “review” ofon youtube, check it out below:
      However, what’s interesting to note is that this guy is a
      paid reviewer who is endorsing this product for a price.  How do I know this???  Check out the image below…

    9. ayashamalik1 3 years ago

      Your manhood will get a raise, and you will be able to feel
      this change is driven to have sex and become a beast in bed urgency. This
      supplement has been proven effective in removing fat from the body and make the
      body took place in a very quick period of time. Get lean muscle development
      very quickly with and
      makes you look like a real macho muscle and the press. Making six packs of your
      belly is very simple with .

    10. ShshaKamal 2 years ago

      Allison . although Jonathan `s postlng is something… last monday I bought themselves a Lotus Elise from having earned $7296 this past four weeks and-just over, 10 grand last month . it’s realy the most rewarding I have ever done . I started this 5 months ago and immediately began to bring in at least $78, per hour . visit,’-,-;,-,;,-,;

    11. gohar7885 2 years ago

      <a href=””></a>
      <a href=””>happy valentines day 2017 wishes</a>

      <a href=””>happy valentines day 2017 images</a>

      <a href=””>happy valentines day quotes 2017</a>

    12. samarthagencies46 2 years ago

      happy valentines day quotes 2017                                                                                                                                                                                                                                                                                                                                                                                      

    13. imtheonly1canutrustme 2 years ago

    Leave a reply

    Your email address will not be published. Required fields are marked *