How to get domain name of site from within a block?

I have a block inside a package for the marketplace. How can I echo out the domain name of the site that the package is installed on? I just need the "" (it cannot include the www. or any sub-domain).


View Replies: View Best Answer
LucasAnderson replied on at Permalink Best Answer Reply
There are certain constants within each concrete5 install that are defined in the config files.

What you're probably looking for is BASE_URL or DIR_REL

echo BASE_URL; should get you the domain, but you may need to play with it a bit to format how you want it.