BasicNav provides two options for output. To a placeholder if you specify &placeholder=`1`, or to return the output inline by either not providing input for &placeholder, or by explicitly setting &placeholder=`0`.
There is an issue with this.
Around line 15 of the BasicNav snippet is this line:
$placeholder = !empty($placeholder) ? $placeholder : TRUE;
If placeholder is set, then use its value. If it's not set, evaluate to true.
However, when you pass in "0" as a parameter in the snippet call, it is sent in as a string, which evaluates to true later in the code.
if ($placeholder) {
$modx->setPlaceholder('basicnav', $result);
return;
} else {
return $result;
}
A suggested fix:
$placeholder = !empty($placeholder) ? (bool)$placeholder : TRUE;
This casts the placeholder parameter to a boolean so that it can be properly evaluated to false.
Hope this helps someone.