I am creating a theme which applies a floating button to every page, which should link to the /contact page in this case
How would I go about ensuring that the proper link gets put into the anchor tag in my template? Taking into account localized pages, etc.
I was thinking to put a variable “buttontarget” into each page’s frontmatter, so the twig can construct the proper localized url out of that.
So what should the buttontarget actually contain to identify the page? (the folder name of the page02.contact, just /contact/myform as a full path, or myform, the slug)
and how do i transform whatever the variable contains to a working page link in twig?
again, i need the language routing to still apply for that
Well I might want to change the button content link (or hide it on the contact page itself) so I want to work with it somehow being tied to the page it is on.
The localized link might be /contact for english, /kontakt for german and something entirely different for other languages. so just getting language and constructing the link myself probably wont work?
I’m afraid that <a href="https://mywebsite.com/contact"> </a> will always go to the contact page using the default language. It also won’t translate the link.