Answers.Body: <p>No, there is no token for base URL is available in civicrm. If you want to use base URL in templates, you can try this:</p>
  
  <pre><code> // Declare $config;
   $config = &amp; CRM_Core_Config::singleton();
  
   $baseUrl = $config-&gt;userFrameworkBaseURL;
  </code></pre>
  
  <p>This will gives you base URL and use variable "$baseUrl" in your template.</p>
  
  <p>Another way is, you can create your custom token for base URL.Refer following link:
  <a href="http://wiki.civicrm.org/confluence/display/CRMDOC/Customized+%28and+Custom%29+Tokens">http://wiki.civicrm.org/confluence/display/CRMDOC/Customized+%28and+Custom%29+Tokens</a></p>
  
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2015-10-26T10:53:04.157Z
Answers.LastActivityDate: 2015-10-26T10:53:04.157Z
Answers.UserDisplayName: 1990rk4
Answers.Body: <p>There is a JIRA ticket that seems related <a href="https://issues.civicrm.org/jira/browse/CRM-11153" rel="nofollow">here</a> but no evidence of an actual resolution to it.</p>
  
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2015-12-21T18:16:02.580Z
Answers.Text: I heard back from that company who said Joeren was no longer there and didn't offer any other suggestions.
Answers.UserDisplayName: petednz - fuzion
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2015-10-06T23:19:51.597Z
Answers.LastActivityDate: 2015-10-06T23:19:51.597Z
Answers.UserDisplayName: petednz - fuzion
Answers.Body: <p>I had the same requirement (moving email templates between test and production). So I created a small extension that adds a Site URL token. You can find it here <a href="https://lab.civicrm.org/kainuk/siteurl" rel="nofollow noreferrer">https://lab.civicrm.org/kainuk/siteurl</a></p>
  
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2020-09-30T18:22:37.313Z
Answers.LastActivityDate: 2020-09-30T18:22:37.313Z
Answers.UserDisplayName: Kainuk - CiviCooP
Body: <p>We are often caught by having links in Message Templates that work on live, but then incorrectly take us to the live site when testing on dev - which can result in confusion or worse, errors or incorrect conclusions.</p>
  
  <p>Anyone know if there is such a token but it just isn't visible via the token selector?</p>
  
Tags: <tokens>
Title: Is there a token for base url?
ThreadText: # Is there a token for base url?
  
  (Asked by: username_0 on 2015-10-06)
  
  We are often caught by having links in Message Templates that work on live, but then incorrectly take us to the live site when testing on dev - which can result in confusion or worse, errors or incorrect conclusions.
  
  Anyone know if there is such a token but it just isn't visible via the token selector?
  
  **Tags:** tokens
  
  
  ---
  
  ## 3 answers
  
  ### Answer by username_1 on 2015-10-26. Score: 5
  
  No, there is no token for base URL is available in civicrm. If you want to use base URL in templates, you can try this:
  
  ```
   // Declare $config;
   $config = & CRM_Core_Config::singleton();
  
   $baseUrl = $config->userFrameworkBaseURL;
  
  ```
  
  This will gives you base URL and use variable "$baseUrl" in your template.
  
  Another way is, you can create your custom token for base URL.Refer following link:
  <http://wiki.civicrm.org/confluence/display/CRMDOC/Customized+%28and+Custom%29+Tokens>
  
  
  ---
  
  ### Answer by username_0 on 2015-10-06. Score: 2
  
  There is a JIRA ticket that seems related [here](https://issues.civicrm.org/jira/browse/CRM-11153) but no evidence of an actual resolution to it.
  
  > **Comments:**
  > **username_0**: I heard back from that company who said Joeren was no longer there and didn't offer any other suggestions.  
  
  ---
  
  ### Answer by username_2 on 2020-09-30. Score: 2
  
  I had the same requirement (moving email templates between test and production). So I created a small extension that adds a Site URL token. You can find it here <https://lab.civicrm.org/username_2/siteurl>
  
  
  ---
  
  