mirror of
https://github.com/OrchardCMS/Orchard.git
synced 2025-10-15 03:25:23 +08:00
Adding some debug info for zone item rendering
- begin and end comments w/ tempate names (covering RenderPartialZoneItem and ContentPartDisplayZoneItem only at the moment) for zone item rendering Tossing them in debug compiler conditions for good measure. Likely to change to something runtime related so the app can be kicked into debug mode at any time (for any individual) --HG-- branch : dev
This commit is contained in:
@@ -50,9 +50,23 @@ namespace Orchard.Core.Themes.DesignerNotes {
|
||||
}
|
||||
|
||||
public void ZoneItemRendering(ZoneRenderContext context, ZoneItem item) {
|
||||
#if DEBUG
|
||||
var writer = context.Html.ViewContext.Writer;
|
||||
if (item is RenderPartialZoneItem)
|
||||
writer.Write(string.Format("<!-- begin: {0} -->", (item as RenderPartialZoneItem).TemplateName));
|
||||
else if (item is ContentPartDisplayZoneItem)
|
||||
writer.Write(string.Format("<!-- begin: {0} -->", (item as ContentPartDisplayZoneItem).TemplateName));
|
||||
#endif
|
||||
}
|
||||
|
||||
public void ZoneItemRendered(ZoneRenderContext context, ZoneItem item) {
|
||||
#if DEBUG
|
||||
var writer = context.Html.ViewContext.Writer;
|
||||
if (item is RenderPartialZoneItem)
|
||||
writer.Write(string.Format("<!-- end: {0} -->", (item as RenderPartialZoneItem).TemplateName));
|
||||
else if (item is ContentPartDisplayZoneItem)
|
||||
writer.Write(string.Format("<!-- end: {0} -->", (item as ContentPartDisplayZoneItem).TemplateName));
|
||||
#endif
|
||||
}
|
||||
|
||||
public void ZoneRendered(ZoneRenderContext context) {
|
||||
|
Reference in New Issue
Block a user