A common problem when developing content in MODx is with anchor tags not working for the current page, due to the base tag required to properly maintain relative paths. To solve this, you can use the following very simple plugin (check the OnWebPagePrerender event):
<?php
$e= & $modx->Event;
switch ($e->name) {
case "OnWebPagePrerender" :
$modx->documentOutput= str_replace('href="#', 'href="' . $modx->makeUrl($modx->documentIdentifier) . '#', $modx->documentOutput);
break;
}
?>
NOTE: Be sure not to include the <?php ?> tags in the plugin editor...
This should work in most situations, but let me know what you think or if you encounter any problems with it. I’ll add it to the repository soon.