Skip to content

Instantly share code, notes, and snippets.


Mark Cassidy cassidydotdk

  • Cassidy Consult
  • St. Gallen, Switzerland
View GitHub Profile
cassidydotdk / RenderItem.cs
Created Aug 11, 2016
Quickly render a Sitecore Controller Rendering, using given Item as Datasource
View RenderItem.cs
public virtual HtmlString RenderItem(Item item, string controller, string action)
Assert.ArgumentNotNull(item, "item");
Assert.ArgumentNotNullOrEmpty(controller, "controller");
Assert.ArgumentNotNullOrEmpty(action, "action");
var r = new Rendering();
r.DataSource = item.Paths.FullPath;
using (RenderingContext.EnterContext(r))
View PerformanceMeasurementProcessorBegin.cs
using System.Diagnostics;
using System.Web;
using Sitecore.Mvc.Pipelines.Response.RenderRendering;
namespace Website.Pipelines.RenderRendering
public class PerformanceMeasurementProcessorBegin : RenderRenderingProcessor
public override void Process(RenderRenderingArgs args)
cassidydotdk / SetupIoc.config
Created May 18, 2016
Setup Castle Windsor for Sitecore 8.1
View SetupIoc.config
<?xml version="1.0"?>
<processor type="Website.SetupIoc, Website" />