[[~[[*id]]]] tag doesn't includes the base url

Hi there.

I have a website where the tag [[~[[*id]]]] doesn’t display the base url.

Instead of ‘https://www.domain.co.uk/path/post.html’ I get only ‘path/post.html’

Any idea where that could come from ? I’ve checked, and the base url is correctly working in the code source.

Try setting <base href="[[!++site_url]]"> in your <head> section.

It won’t, by default.

Use [[~[[*id]]? &scheme=`full`]] if you wish the full, canonical URL.

Source: https://docs.modx.com/3.x/en/extending-modx/modx-class/reference/modx.makeurl


Thanks for your help it worked!

This topic was automatically closed 2 days after the last reply. New replies are no longer allowed.