I'm having an exceedingly difficult time trying to retrieve the Site URL and Name in a custom plugin I am developing.
My research has led me to believe this would work:
$envVar = craft()->config->get('environmentVariables'); $siteUrl = $envVar['siteUrl']; $siteName = $envVar['siteName'];
But in practice this hasn't worked. Does anyone know the correct way?