Answers.Body: <p>Use the alias instead <code>{{ alias('@web') }}</code></p>
  
  <p>It will always point to your <code>web</code> directory </p>
  
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2018-07-20T10:27:36.740Z
Answers.LastActivityDate: 2018-07-20T10:27:36.740Z
Answers.UserDisplayName: Robin Schambach
Body: <p>Up till now, all my craft sites were single language. When including CSS and JS files from <code>web</code> folder, i used to use <code>{{siteUrl}}</code> variable, like this:</p>
  
  <pre><code>&lt;script src='{{siteUrl}}/plugins/jquery.js'&gt;&lt;/script&gt;
  </code></pre>
  
  <p>Such path was rendered to this:</p>
  
  <pre><code>&lt;script src='http://website.com/plugins/jquery.js'&gt;&lt;/script&gt;
  </code></pre>
  
  <p>Unfortunetly, on multilanguage websites, where different languages have different url path (site.com and site.com/en), <code>{{siteUrl}}</code> variable changes and paths to these files are incorrectly rendered, like this:</p>
  
  <pre><code>&lt;script src='http://website.com/en/plugins/jquery.js'&gt;&lt;/script&gt;
  </code></pre>
  
  <p>What variable can i use that will give me path to web folder - regardless of currently used language?</p>
  
Tags: <multi-site>
Title: Including CSS and JS files on multilanguage sites
ThreadText: # Including CSS and JS files on multilanguage sites
  
  (Asked by: username_0 on 2018-07-20)
  
  Up till now, all my craft sites were single language. When including CSS and JS files from `web` folder, i used to use `{{siteUrl}}` variable, like this:
  
  ```
  <script src='{{siteUrl}}/plugins/jquery.js'></script>
  
  ```
  
  Such path was rendered to this:
  
  ```
  <script src='http://website.com/plugins/jquery.js'></script>
  
  ```
  
  Unfortunetly, on multilanguage websites, where different languages have different url path (site.com and site.com/en), `{{siteUrl}}` variable changes and paths to these files are incorrectly rendered, like this:
  
  ```
  <script src='http://website.com/en/plugins/jquery.js'></script>
  
  ```
  
  What variable can i use that will give me path to web folder - regardless of currently used language?
  
  **Tags:** multi-site
  
  
  ---
  
  ## 1 answers
  
  ### Answer by username_1 on 2018-07-20. Score: 3 | Accepted answer
  
  Use the alias instead `{{ alias('@web') }}`
  
  It will always point to your `web` directory
  
  
  ---
  
  