Merge pull request #5558 from sbwalker/dev

added StaticAssetPath properties to base classes
This commit is contained in:
Shaun Walker
2025-08-30 07:49:06 -04:00
committed by GitHub
2 changed files with 20 additions and 2 deletions

View File

@ -140,13 +140,22 @@ namespace Oqtane.Modules
}
}
// path method
// path methods
public string ModulePath()
{
return PageState?.Alias.BaseUrl + "/Modules/" + GetType().Namespace + "/";
}
public string StaticAssetPath
{
get
{
// requires module to have implemented IModule
return PageState?.Alias.BaseUrl + "_content/" + ModuleState.ModuleDefinition?.PackageName + "/";
}
}
// fingerprint hash code for static assets
public string Fingerprint

View File

@ -108,13 +108,22 @@ namespace Oqtane.Themes
}
}
// path method
// path methods
public string ThemePath()
{
return PageState?.Alias.BaseUrl + "/Themes/" + GetType().Namespace + "/";
}
public string StaticAssetPath
{
get
{
// requires theme to have implemented ITheme
return PageState?.Alias.BaseUrl + "_content/" + ThemeState?.PackageName + "/";
}
}
// fingerprint hash code for static assets
public string Fingerprint
{