I am using jquery tabs within my CakePHP project. Here is my Script:
$(function() {
$( "#tabs" ).tabs();
});
Here is my code for the tabs
<div id="tabs">
<ul>
<li><?php echo $this->Html->link('Statistics', array('action' => 'overview_stats', $current_user['id']))?></li>
<li><?php echo $this->Html->link('Orders', array('action' => 'overview_orders', $current_user['id']))?></li>
<li><?php echo $this->Html->link('Past Orders', array('action' => 'overview_past_orders', $current_user['id']))?></li>
<li><?php echo $this->Html->link('Blog Pages', array('action' => 'overview_blog_pages', $current_user['id']))?></li>
<li><?php echo $this->Html->link('Chextands', array('action' => 'overview_chextands', $current_user['id']))?></li>
</ul>
</div>
Each time I click on the tabs, The entire page is rendered within each tab. Is there a way to only render the view within my .ctp file?
Set the layout of those actions to be ‘ajax’:
That way you do not load the entire layout inside the tab.
You must do this in the controller in the respective action