I got a sitemap in my footer that links to all my pages, some pages have different urls because of a rewrite. For example, pages with id 14 have /projects/ before them, and pages with id 16 have /actueel/. How can I check on that and build the list?
This doesn't work (it adds projects to the entire list):
<?
foreach($menufootercr as $menufooterlist){
if($menufooterlist['id'] != ''){
if($menufooterlist['id'] = '14'){
$menufooteroverzicht .= '<li class="menu-item"><a href="projects/'.$menufooterlist['alias'].'.html">'.$menufooterlist['title'].'</a></li>';
}else if($menufooterlist['id'] = '16'){
$menufooteroverzicht .= '<li class="menu-item"><a href="actueel/'.$menufooterlist['alias'].'.html">'.$menufooterlist['title'].'</a></li>';
}else{
$menufooteroverzicht .= '<li class="menu-item"><a href="info/'.$menufooterlist['alias'].'.html">'.$menufooterlist['title'].'</a></li>';
}
}
}
echo $menufooteroverzicht;
?>