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>