As a lead developer at Mutable Labs I found that when using the Yii Bootstrap tabs component you will sometimes want to direct the user to a specific tab and not necessarily the first tab. Yii Bootstrap already provides the "active" variable so you can define whether the tab is the active tab or not in PHP. I generally find though that a PHP solution to this problem is rather cumbersome as every tab component will need the PHP code inserted or you will have to extend the tab component somehow to do it.
Anyways I found that a JQuery solution worked the best for me and here it is. Please make sure you have given your tabbed area an id of "tabs", if you have multiple tabbed areas then using this code again for the other tabbed area is an option. Just place this code into your "layout" or "header" file ...
if(CHttpRequest::getParam("tab") != null): <script> $(document).ready(function() { $('#tabs a:contains("<?php echo CHttpRequest::getParam("tab"); ?>")').tab('show'); }); </script> <?php endif; [/php]
Then all you have to do is set the "tab" get variable in the url. This will then display the correct tab on your page when the page loads.