A pitch of secondary menu

Hi all,

I used a secondary menu with simple-page plugin for 5-6 years. It worked like classical cms for usual articles.
You can see the context here : Le Patrimoine catésien · Archives numériques du Cateau-Cambrésis
the secondary menu was beetwen breadcrums and header
A student have maded the dev, it consisted to make an array with child of simple-page slug (patrimoine-du-cateau)

We had server pb and when I restored this site, this script broke. It may dû to php environnement, i use 8.0 on mutualised server.

If php dev could have a look…

		<!-- If we are in simple page, we show the particular nav. -->
		<?php
		// $jsSetActiveClass = "<script> var d = document.getElementById('menu-patrimoine').parentNode; d.className += ' active'; </script>";
		//	
		//	$patrimoinePage = false;
		//	$parentPage = get_current_record('simple_pages_page', false);
		//	if($parentPage) { $patrimoinePage = is_page_childOf_patrimoine_page($parentPage); }

			
			// si la page courante est une fille de la page de slug 'patrimoine-du-cateau' alors on affiche le sous-menu patrimoine
			// $parentPage->id!='48' : Mentions légales
		//	if(($patrimoinePage)&&($parentPage->id!='48')) {
		//		$resArray = simple_pages_get_links_for_children_pages($patrimoinePage->id, 'order', $requiresIsPublished = true);
		//		if(count($resArray) > 0) {	
		//			$navArray = array();
		//			foreach ($resArray as &$value) {
		//				$navArrayEx = array();
		//				if($value['pages']) {
		//					foreach($value['pages'] as &$subVal) {
		//						$navArrayEx[] = array('label'=>$subVal['label'], 'uri'=>$subVal['uri']);
		//					}
		//				}
		//				$navArray[] = array('label'=>$value['label'], 'uri'=>$value['uri'], 'pages'=>$navArrayEx);
		//				$navarray[] = sort($navarray['pages']);
		//			}
		//			echo('<div id="sub-nav"><nav id="sousmenu" class="ssmenu" role="navigation">'.nav($navArray).'</nav></div>');
		//		}
		//		echo $jsSetActiveClass;
		//	}
		?>

This topic was automatically closed 360 days after the last reply. New replies are no longer allowed.