You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Version - 5.1.1
Render Mode - Interactive
Interactivity - Server
Database - SQL Server
Describe the bug
When loading the Theme ContainerSettings the public override List Resources => new List() is not called.
Expected Behavior
The method is called
Steps To Reproduce
add to a containerSettings component
public override List<Resource> Resources => new List<Resource>()
{
new Resource { ResourceType = ResourceType.Stylesheet, Url = "~/css/Theme.css" },
};
Anything else?
The text was updated successfully, but these errors were encountered:
leigh-pointer
changed the title
override List<Resource> Resources not getting when creating ContainerSettings
override List<Resource> Resources not getting called when creating ContainerSettings
May 13, 2024
This is complicated. The framework Settings component dynamically loads 3 other components at run-time:
A component within a module which implements Oqtane.Interfaces.ISettingsControl
A component within a theme which has a ThemeSettingsType defined in its ThemeInfo
A component within a theme which has a ContainerSettingsType defined in its ThemeInfo
Dynamically loading components within a module does not conform to the standard component loading patterns which means that the Resources are not discovered or loaded by the framework. Resources can currently be defined in 4 standard ways:
In a module component
In a module's ModuleInfo (IModule) class
In a theme component
In a theme's ThemeInfo (ITheme) class
Supporting these exception cases will require some investigation, as we do not want to add custom logic to handle them at the expense of degrading framework performance for the other scenarios (ie. reflection is expensive and would be required to get access to the Resources).
Oqtane Info
Version - 5.1.1
Render Mode - Interactive
Interactivity - Server
Database - SQL Server
Describe the bug
When loading the Theme ContainerSettings the public override List Resources => new List() is not called.
Expected Behavior
The method is called
Steps To Reproduce
add to a containerSettings component
Anything else?
The text was updated successfully, but these errors were encountered: