"content.absolute_url" Incorrect On System Pages

I’m using the “content.absolute_url” to render the current page URL on a multilingual Hubspot site.

I’ve noticed that on one of the language sites, the domain rendered by the “content.absolute_url” filter always seems to output the primary domain URL. Is there any reason or workaround for this?

Thanks for any help!

Hi @SirHubalot (great username btw),

As system pages (404, 500 etc.) do not have a default URL available, this is hard to achieve.

If you are talking about regular website pages, landingpages or blogs and content.absolute_url is not working (which would be really odd), you could try something like this to get the current URL of a multilanguage page:

{{content.translated_content[content.language.languageTag].absoluteUrl}}

Hi Tuen,

Apologies for the late reply.

Yes, I was trying to achieve this on system pages. Everywhere else where I use that function is fine.

I call the content.absolute_url line in my global heading as I have some logic dependent on that.

So just to confirm, there is no solution for it’s use on system pages?

Thanks!

Hi @SirHubalot ,

No problem.
Sadly, no, there is no solution untill they add multilanguage functionality to HubSpot system pages.
Here is an overview of everything the {{content}} dictionary has on a 404 page. As you can see, the slug is nowhere available.