title: How to show OpenCart Parent Categories to Twitter Bootstrap DropDown Main Nav Menu?
body: <p>How to show the OpenCart Parent Categories to a Twitter Bootstraped  Navbar Links?</p>
  
  <p>I want to display the Parent Categories only, and here is my HTML Markup</p>
  
  <pre><code>&lt;ul class="nav" role="navigation"&gt;
      &lt;li class="dropdown" id="fat-menu"&gt;
          &lt;a data-toggle="dropdown" class="dropdown-toggle" role="button" id="drop3" href="#"&gt;Store&lt;b class="caret"&gt;&lt;/b&gt;&lt;/a&gt;
          &lt;ul aria-labelledby="drop3" role="menu" class="dropdown-menu"&gt;
          &lt;li role="presentation"&gt;&lt;a href="#" tabindex="-1" role="menuitem"&gt;Shop Front&lt;/a&gt;&lt;/li&gt;
          &lt;li class="divider" role="presentation"&gt;&lt;/li&gt;
          &lt;li role="presentation"&gt;&lt;a href="#" tabindex="-1" role="menuitem"&gt;Parent Category 1&lt;/a&gt;&lt;/li&gt;&lt;!-- Show Parent Category Here --&gt;
          &lt;li role="presentation"&gt;&lt;a href="#" tabindex="-1" role="menuitem"&gt;Parent Category 2&lt;/a&gt;&lt;/li&gt;
          &lt;/ul&gt;
      &lt;/li&gt;
  &lt;/ul&gt;
  </code></pre>
  
  <p>AND The current markup and PHP codes that I'm looking into... I've tried to copy the LI But it gives a parse error.</p>
  
  <pre><code>&lt;?php if ($categories) { ?&gt;
  &lt;div id="menu-holder" class="&lt;?php echo (isset($styler['menu_style']) &amp;&amp; ($styler['menu_style']!='')) ? $styler['menu_style']."_menu" : '' ;?&gt;"&gt;
  &lt;div id="menu"&gt;
  &lt;ul&gt;
      &lt;li&gt;&lt;a href="&lt;?php echo $home; ?&gt;"&gt;&lt;span class='home_icon'&gt;&lt;/span&gt;&lt;/a&gt;
      &lt;?php foreach ($categories as $category) { ?&gt;
      &lt;li&gt;&lt;a href="&lt;?php echo $category['href']; ?&gt;"&gt;&lt;?php echo $category['name']; ?&gt;&lt;?php if ($category['children']) { ?&gt;&lt;span&gt;&lt;/span&gt;&lt;?php } ?&gt;&lt;/a&gt;
          &lt;?php if ($category['children']) { ?&gt;
          &lt;div&gt;
              &lt;?php for ($i = 0; $i &lt; count($category['children']);) { ?&gt;
              &lt;ul&gt;
                  &lt;?php $j = $i + ceil(count($category['children']) / $category['column']); ?&gt;
                  &lt;?php for (; $i &lt; $j; $i++) { ?&gt;
                  &lt;?php if (isset($category['children'][$i])) { ?&gt;
                  &lt;li&gt;&lt;a&lt;?php echo ($i==(count($category['children'])-1) ? " class='last_submenu_item'" : '');?&gt; href="&lt;?php echo $category['children'][$i]['href']; ?&gt;"&gt;&lt;span&gt;&lt;?php echo $category['children'][$i]['name']; ?&gt;&lt;/span&gt;&lt;/a&gt;&lt;/li&gt;
                  &lt;?php } ?&gt;
                  &lt;?php } ?&gt;
              &lt;/ul&gt;
              &lt;?php } ?&gt;
          &lt;/div&gt;
          &lt;?php } ?&gt;
      &lt;/li&gt;
      &lt;?php } ?&gt;
  &lt;/ul&gt;
  &lt;/div&gt;
  &lt;/div&gt;
  &lt;?php } ?&gt;
  </code></pre>