title: Smarty is not displaying the template
body: <p>I am trying to build a menu for my website and using Smarty to display the pages. When user click on the Logout option the JQuery send an Ajax call to index.php script which contain the code for Smarty to display the page but it is not displaying it. It was working fine before I added the menu. There is no error in the firebug too. Can someone put me in the right direction.</p>
  
  <p>Here is PHP code</p>
  
  <pre><code>    if (isset($_POST['menu_index']))
      {
          if ($_POST['menu_index'] == 'Logout')
          {
              $smarty-&gt;display("login.tpl");  
              exit;            
          }
      }
  </code></pre>
  
  <p>Here is JQuery code</p>
  
  <pre><code>        $('ul li a').on('click', function() {
              var menuItemIndex = $(this).data('val');
              console.log(menuItemIndex);
              $.ajax({
                  url: 'index.php', 
                  type: 'POST', 
                  data: {
                  'menu_index': menuItemIndex
                  }, 
                  dataType: 'json',
                  success: function(response) {
                      alert('success');
                  },
                  error: function(errorMsg) {
                      alert('failed');
                  }
                  });
              });
  </code></pre>
  
  <p>Here is HTML Code</p>
  
  <pre><code>&lt;form name="mainmenu" id="mainmenu"&gt;
      &lt;div id='content'&gt;
         &lt;div id='jqxMenu'&gt;
              &lt;ul&gt;
                  &lt;li&gt;Maintanence
                      &lt;ul style='width: 180px;'&gt;
                          &lt;li&gt;&lt;a href="#" data-val="addCategory"&gt;Add Category&lt;/a&gt;&lt;/li&gt;
                          &lt;li&gt;&lt;a href="#" data-val="addSubCategory"&gt;Add Sub-category&lt;/a&gt;&lt;/li&gt;
                      &lt;/ul&gt;
                  &lt;/li&gt;
                  &lt;li&gt;Process Order
                      &lt;ul style='width: 180px;'&gt;
                          &lt;li&gt;&lt;a href="#" data-val="addShipOrder"&gt;Ship Order&lt;/a&gt;&lt;/li&gt;
                          &lt;li&gt;&lt;a href="#" data-val="addChangeOrder"&gt;Change Order Status&lt;/a&gt;&lt;/li&gt;
                      &lt;/ul&gt;
                  &lt;/li&gt;
                  &lt;li&gt;Reports
                      &lt;ul style='width: 180x;'&gt;
                          &lt;li&gt;&lt;a href="#" data-val="addOrderStation"&gt;Orders by station&lt;/a&gt;&lt;/li&gt;
                          &lt;li&gt;&lt;a href="#" data-val="addOrderDate"&gt;Orders by date&lt;/a&gt;&lt;/li&gt;
                          &lt;li&gt;&lt;a href="#" data-val="addPendingOrder"&gt;Pending Orders&lt;/a&gt;&lt;/li&gt;
                      &lt;/ul&gt;
                  &lt;/li&gt;
                  &lt;li&gt;&lt;a href="#" data-val="Logout"&gt;Logout&lt;/a&gt;&lt;/li&gt;
              &lt;/ul&gt;
          &lt;/div&gt;
     &lt;/div&gt;
  &lt;/form&gt;
  </code></pre>