} } if (!empty($loadContentId)) { $gContent = BitPage::getLibertyObject($loadContentId); } if (empty($gContent) || !is_object($gContent)) { $gContent = new BitPage(); } } // we weren't passed a structure, but maybe this page belongs to one. let's check... if ($gContent->isValid() && empty($gStructure)) { //Get the structures this page is a member of if (!empty($lookupHash['structure'])) { $structure = $lookupHash['structure']; } else { $structure = ''; } $structs = $gContent->getStructures(); if (count($structs) == 1) { $gStructure = new LibertyStructure($structs[0]['structure_id']); if ($gStructure->load()) { $gStructure->loadNavigation(); $gStructure->loadPath(); $gBitSmarty->assign('structureInfo', $gStructure->mInfo); } } else { $gBitSmarty->assign('showstructs', $structs); } } $gBitSmarty->clearAssign('gContent'); $gBitSmarty->assignByRef('gContent', $gContent);