Base solution for your next web application
Open Closed

Unable to add new Metronic Theme #9355


User avatar
0
azmanagedit created

I have followed the guide for Adding New Metronic Theme but when I select the theme "ThemeX" from the Visual Settings and click Save, it then highlights the "Default" theme and as if the new theme doe not exist.

The is new deployment with very little customization at this point using ANZ version 9 (Metronic 7) using Core MVC (jQuery).

Thanks, Robert


4 Answer(s)
  • User Avatar
    0
    ismcagdas created
    Support Team

    Hi @azmanagedit,

    Could you check the AbpSettings table to see if theme setting is changed or not ?

    Thanks,

  • User Avatar
    0
    azmanagedit created

    @ismcagdas I confirmed it is not changing in the AbpSettings table. I tried making changes to other themes and they work correctly, but selecting "ThemeX" does not work...it sets the "default" theme.

  • User Avatar
    0
    azmanagedit created

    Found the problem: in the _ThemeXSettings.cshtml file the value needs to be set to "themex".  The theme updates in the AppSettings table, however, after selecting this, the "Theme X" tab is not selected still.

    Thoughts?

  • User Avatar
    0
    ismcagdas created
    Support Team

    Hi,

    Do you have something like below for your newly added theme's nav item ?

    @(Model.Theme == AppConsts.ThemeX ? "active" : "")"

    Similar to what we have here https://github.com/aspnetzero/aspnet-zero-core/blob/dev/aspnet-core/src/MyCompanyName.AbpZeroTemplate.Web.Mvc/Areas/AppAreaName/Views/UiCustomization/Index.cshtml#L28