You should definitely use the API function $modx->makeURL() in snippets or TVs using @EVAL, (and otherwise the [~xx~] tags) and let MODx work out how to create the URL. What happens if you have index.php?id=xxx scattered all over your site, then it is decided to use Friendly URLs? Good luck changing them all!
makeUrl($id, $alias= '', $args= '', $scheme= '')
$id is the document ID of the page to link to - required.
$alias is the document’s alias - optional - if you want to skip this one and specify any of the others, you must use an empty string ( ’’ ) as its placeholder.
$args - optional - is for any query string arguments you want such as ’action=delete&user=user-to-delete’ (MODx will append the proper starting delimiter, ? or &, depending on whether you’re using friendly URLs or not). Again, if you want to use the last one, you need to use an empty string ( ’’ ) to hold its place.
$scheme - optional - is to specify HTTP or HTTPS.