Files
Umbraco-CMS/umbraco/presentation/UmbracoPage.cs
Shandem f6d0d043b5 DO NOT DOWNLOAD. DOWNLOAT LATEST STABLE FROM RELEASE TAB
Created 4.1.0 branch

[TFS Changeset #55082]
2009-06-19 07:39:16 +00:00

29 lines
842 B
C#

using System;
using System.Collections.Generic;
using System.Web;
namespace umbraco.presentation
{
public class UmbracoPage : System.Web.UI.Page
{
public int PageId { get; set; }
protected override void OnPreInit(EventArgs e)
{
if (UmbracoContext.Current == null)
{
// Set umbraco context
UmbracoContext.Current = new UmbracoContext(HttpContext.Current);
}
HttpContext.Current.Items["pageID"] = PageId;
// setup page properties
page pageObject = new page(((System.Xml.IHasXmlNode) library.GetXmlNodeCurrent().Current).GetNode());
System.Web.HttpContext.Current.Items.Add("pageElements", pageObject.Elements);
base.OnPreInit(e);
}
}
}