Erik Posted January 19, 2021 Share Posted January 19, 2021 When I want to make a link in a template to, for example, the contact form on a bilingual (Dutch and English) website. What does this link look like so that it goes to the currently active language contact form? Link to comment Share on other sites More sharing options...
horst Posted January 19, 2021 Share Posted January 19, 2021 In template files I use the page-id to get the page or, where I have set a specific template name, I use this to get the page, and then uses the $p->url. There are different ways and concepts people uses. I prefer to give own template names to specific pages, limited to one page only, so that I securely can get them from everywhere, regardless what name a editor gives them, or if a site owner deletes a page and creates a new one (what changes the page id). In the templates settings I use the property for mapping a different template (render) file. So, for an unlimited number of basic-pages, 1 imprint page and 1 contact page I use 3 template names and one template file: template file is: site/templates/basic-page.php template names are: basic-page, can be used for (unlimited) new pages imprint, can be used only for one page and is mapped to basic-page (template file) contact, can be used only for one page and is mapped to basic-page (template file) But as already said, that's only my preferred way. ? 2 Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now