5

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?

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

2

There is a JIRA ticket that seems related here but no evidence of an actual resolution to it.

  • I heard back from that company who said Joeren was no longer there and didn't offer any other suggestions. – petednz - fuzion Dec 21 '15 at 18:16

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.