The 3 settings in the themesettings.json file are not working properly.
"Direction": "ltr" <|> getDirection() || isRtlDirection()
"ModeSwitchEnabled": false <|> isModeSwitchEnabled()
"ModeDefault": "dark" <|> getModeDefault()
<img src="https://i.hizliresim.com/9tcbvr9.jpg" />
Screenshots:
<img src="https://i.hizliresim.com/fi9zeiz.jpg" />
<img src="https://i.hizliresim.com/3imbzps.jpg" />
But does work in _Master.cshtml work.
<img src="https://i.hizliresim.com/7q5vv19.jpg" />
Hi,
We rechecked an issue and found that the class instance injected into a partials folder differs from the class which was initialized, it is due to a KTTheme dependency scope.
We will include a fix for this issue in the next Metronic release, to fix this now you can follow the instructions below.
builder.Services.AddScoped<IKTTheme, KTTheme>();
builder.Services.AddScoped<IBootstrapBase, BootstrapBase>();
An item with the same key has already been added.
to fix this error update line 25 in file Starterkit/_keenthemes/libs/KTTheme.cs with the code below.attribute[attributeName] = attributeValue;
Thx for helping.
Glad to hear that it helped you. All the best with your project!
Regards,
Lauris Stepanovs,
Keenthemes Support Team
Hi,
API function should be working in _Master.cshtml as well.
I guess the problem is in your alert value, try to pass elements as a single string value.
<script>
alert("@KTTheme.isModeSwitchEnabled() - @KTTheme.getModeDefault() - @KTTheme.getDirection()");
</script>
It's already working fine in the _Master.cshtml file.
The main problem is that it doesn't work properly with other files.
<img src="https://i.hizliresim.com/3imbzps.jpg" />
Hi,
This still works fine and displays values in the navbar. Please make sure that you are updating the correct file, we have two navbar components SidebarLayout/Header/_Navbar.razor and HeaderLayout/Header/_Navbar.razor, the first file is used in sidebar layouts and a second in header layouts.
Regards,
Lauris Stepanovs,
Keenthemes Support Team
If you open the images I uploaded in a new tab, you will notice that the code works but works incorrectly.
Due to the theme, half of my images are visible while half are not. You should look at the picture in full size.
<img src="https://www.photo.vegalya.com/resimler/2022/11/21/hi4BC.md.png" />
<img src="https://www.photo.vegalya.com/resimler/2022/11/21/hi4BC.png" />
While the result should be rtl dark False, the result is ltr light True.
If you still do not understand the basic problem, I will make a video.