I like to use semi-static menus for 1) small sites, 2) sites where I don’t want the client to mess with the menu, and 3) when I want to simulate that I am in one container but am in another.
I use a simple snippet (there may be others that do this) that outputs an array of document IDs as a list and has a simple "active" state. It also has a way to force an active state if you want to simulate that you are in one section while in another (used for multi language sites). The cool thing is that it does not need to follow the doc tree.
I am sure it is crude but works for me so far but is limited to one level (I don’t know how to work with levels, leave that to wayfinder). I call it semi static since it gets the title dynamically from the documents using GetField snippet (I am lazy, don’t really need the snippet since the date can be easily retrieved using the api but at the time I did not know how and with GetField I can easily reach TVs as well with the same code):
<?php
// Build simple list menu based on array of doc ids
// Note: must have GetField snippet installed
// sample call: [[SimpleMenu? &docIds`1,2,3` &title=`longtitle`]]
// sample call with active ID: [[SimpleMenu? &docIds`1,2,3` &activeId=`2` &title=`longtitle`]]
$docIds = isset($docIds) ? $docIds : '';
$docId = explode(',', $docIds);
$activeId = isset($activeId) ? $activeId : $modx->documentIdentifier;
$title = isset($title) ? $title : 'pagetitle';
$output = '';
$output = '<ul>';
foreach ($docId as $z) {
$y = $modx->runSnippet("GetField", array("docid" => $z, "field" => $title ));
if($z == $activeId) {
$output .= "<li class='active'><a href='[~$z~]' title='$y'>$y</a></li>";
} else {
$output .= "<li><a href='[~$z~]' title='$y'>$y</a></li>\n";
}
}
$output .= '</ul>';
echo $output;
?>