APIs & Integrations

SirHubalot
Member

"content.absolute_url" Incorrect On System Pages

SOLVE

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!

 

 

0 Upvotes
1 Accepted solution
Teun
Solution
Recognized Expert | Diamond Partner
Recognized Expert | Diamond Partner

"content.absolute_url" Incorrect On System Pages

SOLVE

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.



Learn more about HubSpot by following me on LinkedIn or YouTube

Did my answer solve your issue? Help the community by marking it as the solution.


View solution in original post

0 Upvotes
3 Replies 3
Teun
Solution
Recognized Expert | Diamond Partner
Recognized Expert | Diamond Partner

"content.absolute_url" Incorrect On System Pages

SOLVE

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.



Learn more about HubSpot by following me on LinkedIn or YouTube

Did my answer solve your issue? Help the community by marking it as the solution.


0 Upvotes
SirHubalot
Member

"content.absolute_url" Incorrect On System Pages

SOLVE

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!

0 Upvotes
Teun
Recognized Expert | Diamond Partner
Recognized Expert | Diamond Partner

"content.absolute_url" Incorrect On System Pages

SOLVE

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}}

 



Learn more about HubSpot by following me on LinkedIn or YouTube

Did my answer solve your issue? Help the community by marking it as the solution.