title: Pass other data with smarty template
body: <p>My application uses a lot of ajax requests to get the data. I am using smarty template on the server side. What I am current doing is detecting if the requesting is AJAX request on the server side and return corresponding html using smarty templates. But now I want to also pass some more data along with html in JSON format. So my JSON format would look like this </p>
  
  <pre><code>{"body" : "MY HTML", "data1" : "value1", "data2" : "value2"} 
  </code></pre>
  
  <p>Is it possible to do so with Smarty? </p>