mirror of
https://github.com/OrchardCMS/Orchard.git
synced 2026-02-09 09:16:41 +08:00
Making sure the nearest defined zones in the theme/basetheme chain are considered as the zones for the theme in question.
work item: 17575 --HG-- branch : 1.x
This commit is contained in:
@@ -72,12 +72,15 @@ namespace Orchard.Widgets.Services {
|
|||||||
.Select(x => x.Trim())
|
.Select(x => x.Trim())
|
||||||
.ToList();
|
.ToList();
|
||||||
|
|
||||||
// add the zones for the base theme
|
// if this theme has no zones defined then walk the BaseTheme chain until we hit a theme which defines zones
|
||||||
if (!string.IsNullOrWhiteSpace(theme.BaseTheme)) {
|
while (zones.Count() == 0 && theme != null && !string.IsNullOrWhiteSpace(theme.BaseTheme)) {
|
||||||
string baseTheme = theme.BaseTheme;
|
string baseTheme = theme.BaseTheme;
|
||||||
theme = _extensionManager.GetExtension(baseTheme);
|
theme = _extensionManager.GetExtension(baseTheme);
|
||||||
if (theme != null)
|
if (theme != null && theme.Zones != null)
|
||||||
zones.Concat(GetZones(theme).Where(z => !zones.Contains(z)));
|
zones = theme.Zones.Split(',')
|
||||||
|
.Distinct()
|
||||||
|
.Select(x => x.Trim())
|
||||||
|
.ToList();
|
||||||
}
|
}
|
||||||
|
|
||||||
return zones;
|
return zones;
|
||||||
|
|||||||
Reference in New Issue
Block a user