I added this entry on the config file.
$Configuration['Garden']['Domain'] = 'http://localhost/mysite/';
How can I call it? Thanks
Welcome to the community!
What version of Vanilla are you running?
You can access configurations in a plugin by using the C() method, e.g. C('Garden.Domain') will return 'http://localhost/mysite/'.
Check out the Documentation! We are always looking for new content and pull requests.
Click on insightful, awesome, and funny reactions to thank community volunteers for their valuable posts.
If you want to bypass config.php you can use a nifty method of the Gdn_Request class called Domain(). It would look like this:
Kasper Kronborg Isager (kasperisager) | Freelance Developer @Vanilla | Hit me up: Google Mail or Vanilla Mail | Find me on GitHub
@kasperisager method is more reliable
grep is your friend.
Thanks for the response. I tried kasperisager method but it only returns localhost. hgtonight's solution work tho. Thank you so much sir.