Created
July 20, 2016 20:39
-
-
Save matdave/92d6f97bc941595f1e86b1114f18edf8 to your computer and use it in GitHub Desktop.
AnchorFix
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
// Plugin corrects anchored items when base_ref is set to site root | |
// Run OnWebPagePrerender | |
$url = $modx->makeUrl($modx->resource->get('id')); | |
$modx->resource->_output = str_replace(' href="#', ' href="'.$url.'#', $modx->resource->_output); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment