php - Redirecting to a data-toggle tab using the Zend Framework -


currently have page has projects , families. project index page root of application, if go / have list of projects, data-toggle tab list of families.

i using zend framework, when want redirect list of projects, it's simple:

return $this->redirect()->toroute('home'); 

however, seems more complicated redirect families tab. ideas on how this?

my homepage setup follows:

<div class="container-fluid"> <div class="tabbable">     <ul class="nav nav-pills">         <li class="active"><a href="#projects"             data-toggle="tab">projects</a></li>         <li><a href="#families" data-toggle="tab">families</a> </li> </div> </div> <div class="tab-content">         <div id="projects" class="tab-pane active"             style="margin-bottom: 80px;">             <div class="row-fluid">                 <table class="table table-hover">                     <?php echo $headers; ?>                     <?php if (isset($this->active)) : ?>                     <?php echo $this->partialloop('project/project/summary.phtml', $this->active) ?>                     <?php endif; ?>                 </table>             </div>         </div>         <div id="families" class="tab-pane"             style="margin-bottom: 80px;">             <div class="row-fluid">                 <table class="table table-hover">                     <?php echo $family_headers; ?>                     <?php if (isset($this->families)) : ?>                     <?php echo $this->partialloop('family/family/summary.phtml', $this->families) ?>                     <?php endif; ?>                 </table>             </div>           </div>            </div> 

i'm guessing there's way use partialloop in controller, i'm not sure how.

in documentation of toroute can post more 1 argument. third 1 $option. can type: array('fragment' => 'families') , redirect you.domain/#families:

return $this->redirect()->toroute('home', array(), array('fragment' => 'families')); 

i hope you.


Comments

Popular posts from this blog

sublimetext3 - what keyboard shortcut is to comment/uncomment for this script tag in sublime -

java - No use of nillable="0" in SOAP Webservice -

ubuntu - Laravel 5.2 quickstart guide gives Not Found Error -