From 37afd1aec94ba60b5255eddad94c55f5db5e8adb Mon Sep 17 00:00:00 2001 From: sbwalker Date: Tue, 28 Jan 2025 08:27:10 -0500 Subject: [PATCH] add ThemeState property to ThemeBase --- Oqtane.Client/Themes/ThemeBase.cs | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/Oqtane.Client/Themes/ThemeBase.cs b/Oqtane.Client/Themes/ThemeBase.cs index 62bc44cc..91091dbf 100644 --- a/Oqtane.Client/Themes/ThemeBase.cs +++ b/Oqtane.Client/Themes/ThemeBase.cs @@ -84,6 +84,16 @@ namespace Oqtane.Themes } } + // property for obtaining theme information about this theme component + public Theme ThemeState + { + get + { + var type = GetType().Namespace + ", " + GetType().Assembly.GetName().Name; + return PageState?.Site.Themes.FirstOrDefault(item => item.ThemeName == type); + } + } + // path method public string ThemePath()