kernel
[ class tree: kernel ] [ index: kernel ] [ all elements ]

Source for file mod_side_menu.php

Documentation is available at mod_side_menu.php

  1. <?php
  2. /**
  3.  * $Header$
  4.  *
  5.  * Copyright ( c ) 2004 bitweaver.org
  6.  * All Rights Reserved. See below for details and a complete list of authors.
  7.  * Licensed under the GNU LESSER GENERAL PUBLIC LICENSE. See http://www.gnu.org/copyleft/lesser.html for details
  8.  *
  9.  * @package kernel
  10.  * @subpackage modules
  11.  */
  12. extract$moduleParams );
  13.  
  14. if!empty$module_params ) ) {
  15.     $gBitSmarty->assign'modParams'$module_params );
  16. }
  17.  
  18. global $gStructure$gContent;
  19. if!$gStructure and $gContent {
  20.     $structs $gContent->getStructures();
  21.     if count($structs)  {
  22.         $gStructure new LibertyStructure$structs[0]['structure_id');
  23.         if$gStructure->load() ) {
  24.             $gStructure->loadNavigation();
  25.             $gStructure->loadPath();
  26.             $gBitSmarty->assign'structureInfo'$gStructure->mInfo );
  27.         }
  28.     }
  29. }
  30.  
  31. /**
  32.  * Handle an existing content item structure or create an empty one
  33.  */
  34. if$gStructure and !empty($gStructure->mInfo['structure_path']) ) {
  35.     $secondbox 0;
  36.     $tree 1;
  37.     $gStructure->mInfo['structure_path'][0]['structure_id'];            
  38.     if$gStructure->mInfo['parent']['structure_id'== $sidebox $gStructure->mInfo['content_id'3;
  39.     elseif$gStructure->mInfo['parent']['content_id'$sidebox $gStructure->mInfo['parent']['content_id'3;
  40.     else $sidebox 1;
  41.     if$gStructure->mInfo['content_id'!= {
  42.         $menu $gStructure->buildTreeToc$tree );
  43.         $gBitSmarty->assign_by_ref'menu'$menu[0]['sub');
  44.         $gBitSmarty->assign'sidebox'$sidebox );
  45.         if ($secondbox{
  46.             $secondmenu $gStructure->buildTreeToc$secondbox );
  47.             $gBitSmarty->assign_by_ref'secondmenu'$secondmenu[0]['sub');
  48.         }
  49.     }    
  50. else {
  51.     require_onceLIBERTY_PKG_PATH.'LibertyStructure.php' );
  52.     $gStructure new LibertyStructure);
  53.     $menu $gStructure->buildTreeToc);
  54.     $gBitSmarty->assign_by_ref'menu'$menu[0]['sub');
  55. }
  56.  
  57. ?>

Documentation generated on Wed, 29 Jul 2015 13:57:12 +0000 by phpDocumentor 1.5.0-lsces