mirror of
https://github.com/OrchardCMS/Orchard.git
synced 2025-10-15 11:44:58 +08:00
Removing unnecessary if when creating shape alternates
This commit is contained in:
@@ -39,12 +39,8 @@ namespace Orchard.Widgets {
|
||||
widget.Classes.Add("widget-" + widgetPart.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);
|
||||
}
|
||||
// Replacing dashes to shape type-compatible double underscores.
|
||||
displaying.ShapeMetadata.Alternates.Add("Widget__Name__" + widgetPart.Name.Replace("-", "__"));
|
||||
}
|
||||
|
||||
}
|
||||
|
Reference in New Issue
Block a user