mirror of
https://github.com/OrchardCMS/Orchard.git
synced 2025-07-19 07:00:33 +08:00
Fixing that widgets with name containing dash can't have named alternates #3379
This commit is contained in:
parent
7d689710cc
commit
1c4c64b812
@ -39,8 +39,13 @@ namespace Orchard.Widgets {
|
|||||||
widget.Classes.Add("widget-" + widgetPart.Name);
|
widget.Classes.Add("widget-" + widgetPart.Name);
|
||||||
|
|
||||||
// Widget__Name__[Name]
|
// Widget__Name__[Name]
|
||||||
|
if (widgetPart.Name.Contains("-")) {
|
||||||
|
displaying.ShapeMetadata.Alternates.Add("Widget__Name__" + widgetPart.Name.Replace("-", "__"));
|
||||||
|
}
|
||||||
|
else {
|
||||||
displaying.ShapeMetadata.Alternates.Add("Widget__Name__" + widgetPart.Name);
|
displaying.ShapeMetadata.Alternates.Add("Widget__Name__" + widgetPart.Name);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
Loading…
Reference in New Issue
Block a user