diff options
| author | spiderr <spider@viovio.com> | 2013-05-15 13:41:16 -0400 |
|---|---|---|
| committer | spiderr <spider@viovio.com> | 2013-05-15 13:41:16 -0400 |
| commit | 8d4d37ded053a677d7d4a7ad8e8f41a700492c5b (patch) | |
| tree | aa87f5adc5a04da4490e641755f14b4f6f36b3d5 /smartyplugins/block.jstab.php | |
| parent | 51a1f55df1f93d21389e661cfd1b0d1febfe72c3 (diff) | |
| download | themes-8d4d37ded053a677d7d4a7ad8e8f41a700492c5b.tar.gz themes-8d4d37ded053a677d7d4a7ad8e8f41a700492c5b.tar.bz2 themes-8d4d37ded053a677d7d4a7ad8e8f41a700492c5b.zip | |
allow for position in jstab
Diffstat (limited to 'smartyplugins/block.jstab.php')
| -rw-r--r-- | smartyplugins/block.jstab.php | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/smartyplugins/block.jstab.php b/smartyplugins/block.jstab.php index ceae995..44b8a9c 100644 --- a/smartyplugins/block.jstab.php +++ b/smartyplugins/block.jstab.php @@ -25,7 +25,12 @@ function smarty_block_jstab( $pParams, $pContent, &$gBitSmarty, $pRepeat ) { $tabId = strtolower( isset( $pParams['id'] ) ? $pParams['id'] : 'tab'.preg_replace("/[^A-Za-z0-9]/", '', $tTitle) ); - $jsTabLinks[] = '<li '.$tClick.' '.$tClass.' '.$tStyle.'><a href="#'.$tabId.'" data-toggle="tab">' . htmlspecialchars( $tTitle ) . '</a></li>'; + $tabString = '<li '.$tClick.' '.$tClass.' '.$tStyle.'><a href="#'.$tabId.'" data-toggle="tab">' . htmlspecialchars( $tTitle ) . '</a></li>'; + if( isset( $pParams['position'] ) ) { + array_splice( $jsTabLinks, $pParams['position'], 0, $tabString ); + } else { + $jsTabLinks[] = $tabString; + } $ret = '<div class="tab-pane" id="'.$tabId.'">'; $ret .= $pContent; |
