-
Notifications
You must be signed in to change notification settings - Fork 57
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Use the $ThemeDir
variable instead of a static path
#67
Conversation
This commit fixes issue #66.
I've just noticed that |
Yeah using |
I have noticed that According to the comments only projects with an Does that mean, themes are generally not considered as modules? |
As this is an issue related to the silverstripe-framework I now created an issue in the proper repository: The issue can be solved as soon as said issue of the silverstripe-framework is fixed. Until that, using |
For what it's worth, we use $resourceURL in our CWP theme templates by referencing a kind of relative path: https://github.com/silverstripe/cwp-starter-theme/blob/master/templates/Includes/Favicon.ss
|
Humh... Fair, this is another good approach. In issue silverstripe/silverstripe-framework#7592 they are looking for some good replacement for |
ThemeDir is deprecated, so we shouldn't be using it. ModuleLoader doesn't work for themes though, unfortunately, @robbieaverill . Unless something's changed. :P |
Use |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
As commented, please don't use deprecated $ThemeDir.
You can use <link rel="shortcut icon" href="$resourceURL('themes/simple/images/favicon.ico')" />
instead.
In this PR I replaced the static path to the favicon with the currently deprecated
$ThemeDir
variable.Another possibility would be to use
$resourceUrl("silverstripe-themes/simple:{ path }")
instead.This PR fixes issue #66.