I have a main site for learning programming languages. There are 10 of them. I want to be able to pass a variable (the context of the current language being taught) when I go to the Help Center page, for example as a parameter in the url string, in order to display the articles in Guide according to this context. Can I use a custom variable in the theme templates in this way when customizing the theme? And in general, is there any way to use variables from the main site in custom theme templates?
Login to the community
No account yet? Create an account
Enter your E-mail address. We'll send you an e-mail with instructions to reset your password.
One way you could go about this is by adding a search parameter to the href of your anchor tags on your main site i.e
https://subdomain.zendesk.com/hc/en-us?language=javascript. Then, you could access the search param value via thewindow.location.hrefobject from your help center and make your changes accordingly.I hope this helps! Let me know if you have any questions.
Tipene