component rendering optimizations

This commit is contained in:
sbwalker
2024-01-04 13:47:51 -05:00
parent d35ef2d360
commit f75179b2f6
7 changed files with 61 additions and 44 deletions

View File

@ -1,7 +1,5 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Xml.Linq;
using Oqtane.Models;
namespace Oqtane.UI
@ -38,5 +36,12 @@ namespace Oqtane.UI
{
get { return Site.Languages; }
}
// determines if the PageState matches the ModuleState for component rendering purposes
public bool RenderModuleInstance(Module ModuleState)
{
return Page.PageId == ModuleState.PageId && (ModuleId == -1 || ModuleId == ModuleState.ModuleId) && Action == ModuleState.Action;
}
}
}