Go to the documentation of this file.00001 using System;
00002 using System.Web.Mvc;
00003
00004 namespace N2.Web.Mvc.Html
00005 {
00006 public static class ZoneExtensions
00007 {
00014 public static ZoneHelper Zone(this HtmlHelper helper, string zoneName)
00015 {
00016 return helper.Zone(helper.CurrentItem(), zoneName);
00017 }
00018
00026 public static ZoneHelper Zone(this HtmlHelper helper, ContentItem item, string zoneName)
00027 {
00028 return new ZoneHelper(helper, zoneName, item);
00029 }
00030
00037 public static void RenderZone(this HtmlHelper helper, string zoneName)
00038 {
00039 helper.RenderZone(helper.CurrentItem(), zoneName);
00040 }
00041
00049 public static void RenderZone(this HtmlHelper helper, ContentItem item, string zoneName)
00050 {
00051 new ZoneHelper(helper, zoneName, item).Render(helper.ViewContext.HttpContext.Response.Output);
00052 }
00053 }
00054 }