Block menu items

 

 

OK, I have run into a small snag. I have created a block with two tabbed menu items. I have the functionality working - for the most part, but I am stuck because I can not figure out how to display the name or title of the section in the menu.

 

So, this is what the page looks like on fresh load. The menu is not displaying the current selected field. This is not a big deal, but would be nice to display the name of the default selection.

 

 

clicking the menu does display the proper selections, and does go to page selected properly

 

After making a selection - proper info is displayed, but still no name in the menu of the selected page

 

 

Here is my code:

 

on BxGroupsPageView =>

 

function getBlockCode_Desc()
    {
        $uri = $this->aDataEntry['uri'];
         return array(
              $this->_oTemplate->blockDesc ($this->aDataEntry),
              array(
                  _t('Description') => array(
                      'href' => BX_DOL_URL_ROOT . 'm/markets/view/'.$uri,
                      'dynamic' => true,
                      'active' => $this->isEditable,
                  ),
                  _t('Specifications') => array(
                      'href' => BX_DOL_URL_ROOT . 'm/markets/view/'.$uri.'?desc=specifications',
                      'dynamic' => true,
                      'active' => $this->isEditable,
                  ),
              )
        );
    }

 

on BxGroupsTemplate =>

 

function blockDesc (&$aDataEntry)
    {
        $DescriptionType = $_GET['desc'];       
        if (!$DescriptionType) {           
            $aVars = array (
                'description' => $aDataEntry['desc'],
            );
        }
        if ($DescriptionType) {
                switch ($DescriptionType) {
                case 'specifications':       
                    $aVars = array (
                        'description' => $aDataEntry['specifications'],
                    );
                break;
                case 'accessories':       
                    $aVars = array (
                        'description' => 'accessories',
                    );
                break;
            }

        } 
        return $this->parseHtmlByName('block_description', $aVars);
    }

 

html page block_description =>

 

<div class="bx-def-font-large">
        __description__
</div>

block menu.png · 894.9K · 302 views
block menu selections.jpg · 428.9K · 275 views
block menu after selections.jpg · 423.5K · 268 views
caredesign.net
Quote · 1 May 2016

Well, nvm - I got it figured out:

 

    function getBlockCode_Desc()
    {
        $uri = $this->aDataEntry['uri'];
        $sMode = isset($_REQUEST['desc']) ? $_REQUEST['desc'] : 'description';
       
         return array(
              $this->_oTemplate->blockDesc ($this->aDataEntry),
              array(
                  _t('Description') => array(
                      'href' => BX_DOL_URL_ROOT . 'm/markets/view/'.$uri,
                      'dynamic' => true,
                      'active' => $sMode == 'description'
                  ),
                  _t('Specifications') => array(
                      'href' => BX_DOL_URL_ROOT . 'm/markets/view/'.$uri.'?desc=specifications',
                      'dynamic' => true,
                      'active' => $sMode == 'specifications'
                  ),
              )
        );
    }

caredesign.net
Quote · 1 May 2016
 
 
Below is the legacy version of the Boonex site, maintained for Dolphin.Pro 7.x support.
The new Dolphin solution is powered by UNA Community Management System.