if($modx->resource->get('id') !=$modx->config['site_start']) { $modx->resource->_output =str_replace('href="#','href="' .$modx->makeUrl($modx->resource->get('id')) .'#',$modx->resource->_output); }
This question has been answered by markh. See the first response.
if($modx->resource->get('id') !=$modx->config['site_start']) { $modx->resource->_output =str_replace('href="#','href="' .$modx->makeUrl($modx->resource->get('id'),'','','full') .'#',$modx->resource->_output); }
<?php if($modx->resource->get('id') !=$modx->config['site_start']) { $modx->resource->_output =str_replace('href="#','href="' .$_SERVER['REQUEST_URI'].'#',$modx->resource->_output); }