Using if statements to only show language switcher url if there is a translated page in HubSpot
Hi all,
Is it possible to have a statement in my language switcher module so that only if there is a translated page in that language available to display that language option in the switcher, if not don't display that language option in the dropdown?
I ran into this problem myself. I searched developer info and all of the docs. As far as I can tell, There is no way to to determine whether a page has translations or not. an ugly solution would be to use the modules html wrapper to check the page name for page's that have translations. something like.
{% if content.name == 'page name 1' or if content.name == 'page name 2' %}
{{html}}
{% endif %}