diff --git a/src/SimpleStyleguideController.php b/src/SimpleStyleguideController.php index 8bf57d9..b809167 100755 --- a/src/SimpleStyleguideController.php +++ b/src/SimpleStyleguideController.php @@ -4,6 +4,7 @@ use SilverStripe\Control\Controller; use SilverStripe\Control\Director; +use SilverStripe\Core\Manifest\ModuleResourceLoader; use SilverStripe\Core\Injector\Injector; use SilverStripe\Security\Permission; use SilverStripe\CMS\Model\SiteTree; @@ -41,7 +42,7 @@ class SimpleStyleguideController extends Controller * @config * @var string */ - private static $placeholder_image_url = '/resources/vendor/benmanu/silverstripe-simple-styleguide/images/placeholder.png'; + private static $placeholder_image_url = 'benmanu/silverstripe-simple-styleguide: images/placeholder.png'; /** * @var array @@ -204,6 +205,7 @@ public function getColorSwatches() public function getPlaceholderImageURL() { $url = $this->config()->placeholder_image_url; + $url = ModuleResourceLoader::singleton()->resolveURL($url); $this->extend('updatePlaceholderImageURL', $url);