I have a resource, that is additionaly rendered by a plugin snippet with renderResources to use its output somewhere else. But the renderResources output differs to the resources output. All links have double site url in the output by renderResources. The Chunks have a [[++site_url]]. The resource renders well, the snippet renders as if [[++site_url]][[++site_url]].
If you have this in the head of your templates,
<base href="[[++site_url]]" />
MODX will prepend the site url to any href. That may be what's happening. You could try it without any ++site_url tags and see if the links work.
Can you give some examples of the ++site_url tags in your chunks?
The proper solution is to use this tag in the head section of all your templates and remove all the ++site_url tags:
<base href="[[++site_url]]" />
If you have more then one front-end context, it should be:
<base href="[[!++site_url]]" />
If that doesn't give you full URLs and you want them, you can do this:
[[~[[+id]]? &scheme=`full`]]
[ed. note: BobRay last edited this post 10 years, 9 months ago.]
Oops. Try this:
[[~[[+id]]? &scheme=`full`]]
I was thinking of $modx-makeUrl() in a custom snippet, in which case it's:
$modx-makeUrl($id, "", "", "full");