Merge pull request #19 from sbwalker/master

Fix module settings issue
This commit is contained in:
Shaun Walker 2019-05-21 12:29:05 -04:00 committed by GitHub
commit 921306f7b2
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 21 additions and 5 deletions

View File

@ -74,11 +74,14 @@
}
if (authorized)
{
// get module control title
string title = (string)moduleType.GetProperty("Title").GetValue(moduleobject);
if (title != "")
if (PageState.Control != "Settings")
{
module.Title = title;
// get module control title
string title = (string)moduleType.GetProperty("Title").GetValue(moduleobject);
if (title != "")
{
module.Title = title;
}
}
builder.OpenComponent(0, Type.GetType(Constants.DefaultContainer));
builder.AddAttribute(1, "ModuleState", module);

View File

@ -1,4 +1,17 @@
@using Oqtane.Themes
@inherits ContainerBase
@ModuleState.Title
@title
@functions {
string title = "";
protected override void OnInit()
{
title = ModuleState.Title;
if (PageState.Control == "Settings")
{
title = PageState.Control;
}
}
}