added StaticAssetPath properties to base classes

This commit is contained in:
sbwalker
2025-08-30 07:48:26 -04:00
parent efa466e1d6
commit 1ebf3c4077
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
{