HtmlHelperExtensionsWidgetZone Method |
Renders widget zone markup.
Namespace: Kentico.PageBuilder.Web.MvcAssembly: Kentico.Content.Web.Mvc (in Kentico.Content.Web.Mvc.dll) Version: 13.0.131
Syntax public static IHtmlContentProxy WidgetZone(
this HtmlHelperExtensionPoint htmlHelper,
string zoneName = null,
IEnumerable<string> allowedWidgets = null
)
Parameters
- htmlHelper
- Type: Kentico.Web.MvcHtmlHelperExtensionPoint
HtmlHelper extension. - zoneName (Optional)
- Type: SystemString
Widget zone name. - allowedWidgets (Optional)
- Type: System.Collections.GenericIEnumerableString
Identifiers of allowed widgets in the zone. All widgets are allowed by default.
Return Value
Type:
IHtmlContentProxyReturns HTML markup for widget zone container for edit mode.
Usage Note
In Visual Basic and C#, you can call this method as an instance method on any object of type
HtmlHelperExtensionPoint. When you use instance method syntax to call this method, omit the first parameter. For more information, see
Extension Methods (Visual Basic) or
Extension Methods (C# Programming Guide).
Exceptions Exception | Condition |
---|
ArgumentNullException | Thrown when htmlHelper is null. |
ArgumentException | Thrown when zoneName is empty. |
Remarks
For the live site, null value is returned. The HTML markup of widgets included in the zone is rendered directly to the response.
See Also