merge
This commit is contained in:
@@ -103,6 +103,8 @@
|
||||
<char org="Ä">ae</char>
|
||||
<char org="Ö">oe</char>
|
||||
</urlReplacing>
|
||||
|
||||
<removeUmbracoVersionHeader>true</removeUmbracoVersionHeader>
|
||||
</requestHandler>
|
||||
|
||||
<templates>
|
||||
|
||||
@@ -280,6 +280,28 @@ namespace umbraco
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets a value indicating whether umbraco shouldn't add X-Umbraco-Version to the http header.
|
||||
/// </summary>
|
||||
/// <value><c>true</c> if umbraco will not add header; otherwise, <c>false</c>.</value>
|
||||
public static bool RemoveUmbracoVersionHeader
|
||||
{
|
||||
get
|
||||
{
|
||||
try
|
||||
{
|
||||
bool result;
|
||||
if (bool.TryParse(GetKey("/settings/requestHandler/removeUmbracoVersionHeader"), out result))
|
||||
return result;
|
||||
return false;
|
||||
}
|
||||
catch
|
||||
{
|
||||
return false;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// This will add a trailing slash (/) to urls when in directory url mode
|
||||
/// NOTICE: This will always return false if Directory Urls in not active
|
||||
|
||||
@@ -208,7 +208,8 @@ namespace umbraco
|
||||
base.OnInit(e);
|
||||
|
||||
// Add Umbraco header
|
||||
Response.AddHeader("X-Umbraco-Version", string.Format("{0}.{1}", GlobalSettings.VersionMajor, GlobalSettings.VersionMinor));
|
||||
if (!UmbracoSettings.RemoveUmbracoVersionHeader)
|
||||
Response.AddHeader("X-Umbraco-Version", string.Format("{0}.{1}", GlobalSettings.VersionMajor, GlobalSettings.VersionMinor));
|
||||
}
|
||||
|
||||
private void initUmbracoPage()
|
||||
|
||||
@@ -196,17 +196,16 @@ namespace umbraco
|
||||
{
|
||||
}
|
||||
|
||||
HttpContext.Current.Trace.Write("umbracoPage", "testing altTemplate");
|
||||
// Check for alternative template
|
||||
if (HttpContext.Current.Items["altTemplate"] != null &&
|
||||
HttpContext.Current.Items["altTemplate"].ToString() != "")
|
||||
HttpContext.Current.Items["altTemplate"].ToString() != String.Empty)
|
||||
{
|
||||
template =
|
||||
umbraco.cms.businesslogic.template.Template.GetTemplateIdFromAlias(
|
||||
HttpContext.Current.Items["altTemplate"].ToString());
|
||||
elements.Add("template", template.ToString());
|
||||
}
|
||||
else if (helper.Request("altTemplate") != "")
|
||||
else if (helper.Request("altTemplate") != String.Empty)
|
||||
{
|
||||
template =
|
||||
umbraco.cms.businesslogic.template.Template.GetTemplateIdFromAlias(helper.Request("altTemplate").ToLower());
|
||||
|
||||
@@ -15,12 +15,14 @@ using umbraco.BusinessLogic;
|
||||
using umbraco.IO;
|
||||
using System.Web;
|
||||
|
||||
namespace umbraco {
|
||||
namespace umbraco
|
||||
{
|
||||
/// <summary>
|
||||
/// Holds methods for parsing and building umbraco templates
|
||||
/// </summary>
|
||||
///
|
||||
public class template {
|
||||
public class template
|
||||
{
|
||||
#region private variables
|
||||
StringBuilder templateOutput = new StringBuilder();
|
||||
|
||||
@@ -34,32 +36,38 @@ namespace umbraco {
|
||||
#endregion
|
||||
|
||||
#region public properties
|
||||
public String TemplateContent {
|
||||
set {
|
||||
public String TemplateContent
|
||||
{
|
||||
set
|
||||
{
|
||||
templateOutput.Append(value);
|
||||
}
|
||||
get {
|
||||
get
|
||||
{
|
||||
return templateOutput.ToString();
|
||||
}
|
||||
}
|
||||
|
||||
public int MasterTemplate {
|
||||
public int MasterTemplate
|
||||
{
|
||||
get { return _masterTemplate; }
|
||||
}
|
||||
|
||||
//added fallback to the default template to avoid nasty .net errors.
|
||||
//This is referenced in /default.aspx.cs during page rendering.
|
||||
public string MasterPageFile {
|
||||
get {
|
||||
public string MasterPageFile
|
||||
{
|
||||
get
|
||||
{
|
||||
|
||||
string file = TemplateAlias.Replace(" ", "") + ".master";
|
||||
string path = SystemDirectories.Masterpages + "/" + file;
|
||||
|
||||
|
||||
if (System.IO.File.Exists(IOHelper.MapPath( VirtualPathUtility.ToAbsolute( path ) )))
|
||||
if (System.IO.File.Exists(IOHelper.MapPath(VirtualPathUtility.ToAbsolute(path))))
|
||||
return path;
|
||||
else
|
||||
return SystemDirectories.Umbraco + "/masterPages/default.master";
|
||||
return SystemDirectories.Umbraco + "/masterPages/default.master";
|
||||
}
|
||||
}
|
||||
|
||||
@@ -71,7 +79,8 @@ namespace umbraco {
|
||||
string path = SystemDirectories.Masterpages + "/" + templateFolder + "/" + file;
|
||||
|
||||
//if it doesn't exists then we return the normal file
|
||||
if (!System.IO.File.Exists(IOHelper.MapPath(VirtualPathUtility.ToAbsolute(path)))){
|
||||
if (!System.IO.File.Exists(IOHelper.MapPath(VirtualPathUtility.ToAbsolute(path))))
|
||||
{
|
||||
|
||||
string originalPath = IOHelper.MapPath(VirtualPathUtility.ToAbsolute(MasterPageFile));
|
||||
string copyPath = IOHelper.MapPath(VirtualPathUtility.ToAbsolute(path));
|
||||
@@ -90,24 +99,27 @@ namespace umbraco {
|
||||
replacement.Write(newfile);
|
||||
replacement.Close();
|
||||
}
|
||||
|
||||
|
||||
return path;
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
public string TemplateAlias {
|
||||
public string TemplateAlias
|
||||
{
|
||||
get { return _templateAlias; }
|
||||
}
|
||||
#endregion
|
||||
|
||||
#region public methods
|
||||
|
||||
public override string ToString() {
|
||||
public override string ToString()
|
||||
{
|
||||
return this._templateName;
|
||||
}
|
||||
|
||||
public Control ParseWithControls(page umbPage) {
|
||||
public Control ParseWithControls(page umbPage)
|
||||
{
|
||||
System.Web.HttpContext.Current.Trace.Write("umbracoTemplate", "Start parsing");
|
||||
|
||||
if (System.Web.HttpContext.Current.Items["macrosAdded"] == null)
|
||||
@@ -124,7 +136,8 @@ namespace umbraco {
|
||||
|
||||
// Find header and footer of page if there is an aspnet-form on page
|
||||
if (templateOutput.ToString().ToLower().IndexOf("<?aspnet_form>") > 0 ||
|
||||
templateOutput.ToString().ToLower().IndexOf("<?aspnet_form disablescriptmanager=\"true\">") > 0) {
|
||||
templateOutput.ToString().ToLower().IndexOf("<?aspnet_form disablescriptmanager=\"true\">") > 0)
|
||||
{
|
||||
pageForm.Attributes.Add("method", "post");
|
||||
pageForm.Attributes.Add("action", Convert.ToString(System.Web.HttpContext.Current.Items["VirtualUrl"]));
|
||||
|
||||
@@ -134,11 +147,14 @@ namespace umbraco {
|
||||
int aspnetFormTagEnd = tempOutput.ToString().ToLower().IndexOf("</?aspnet_form>") + 15;
|
||||
|
||||
// check if we should disable the script manager
|
||||
if (aspnetFormTagBegin == -1) {
|
||||
if (aspnetFormTagBegin == -1)
|
||||
{
|
||||
aspnetFormTagBegin =
|
||||
templateOutput.ToString().ToLower().IndexOf("<?aspnet_form disablescriptmanager=\"true\">");
|
||||
aspnetFormTagLength = 42;
|
||||
} else {
|
||||
}
|
||||
else
|
||||
{
|
||||
ScriptManager sm = new ScriptManager();
|
||||
sm.ID = "umbracoScriptManager";
|
||||
pageForm.Controls.Add(sm);
|
||||
@@ -148,7 +164,8 @@ namespace umbraco {
|
||||
StringBuilder header = new StringBuilder(tempOutput.ToString().Substring(0, aspnetFormTagBegin));
|
||||
|
||||
// Check if there's an asp.net head element in the header
|
||||
if (header.ToString().ToLower().Contains("<?aspnet_head>")) {
|
||||
if (header.ToString().ToLower().Contains("<?aspnet_head>"))
|
||||
{
|
||||
StringBuilder beforeHeader = new StringBuilder(header.ToString().Substring(0, header.ToString().ToLower().IndexOf("<?aspnet_head>")));
|
||||
header.Remove(0, header.ToString().ToLower().IndexOf("<?aspnet_head>") + 14);
|
||||
StringBuilder afterHeader = new StringBuilder(header.ToString().Substring(header.ToString().ToLower().IndexOf("</?aspnet_head>") + 15, header.Length - header.ToString().ToLower().IndexOf("</?aspnet_head>") - 15));
|
||||
@@ -156,7 +173,8 @@ namespace umbraco {
|
||||
|
||||
// Find the title from head
|
||||
MatchCollection matches = Regex.Matches(header.ToString(), @"<title>(.*?)</title>", RegexOptions.IgnoreCase | RegexOptions.Multiline);
|
||||
if (matches.Count > 0) {
|
||||
if (matches.Count > 0)
|
||||
{
|
||||
StringBuilder titleText = new StringBuilder();
|
||||
HtmlTextWriter titleTextTw = new HtmlTextWriter(new System.IO.StringWriter(titleText));
|
||||
parseStringBuilder(new StringBuilder(matches[0].Groups[1].Value), umbPage).RenderControl(titleTextTw);
|
||||
@@ -172,7 +190,8 @@ namespace umbraco {
|
||||
pageHeader.Controls.Add(pageAspNetHead);
|
||||
pageHeader.Controls.Add(parseStringBuilder(afterHeader, umbPage));
|
||||
|
||||
} else
|
||||
}
|
||||
else
|
||||
pageHeader.Controls.Add(parseStringBuilder(header, umbPage));
|
||||
|
||||
|
||||
@@ -190,22 +209,26 @@ namespace umbraco {
|
||||
pageContent.Controls.Add(pageFooter);
|
||||
return pageContent;
|
||||
|
||||
} else
|
||||
}
|
||||
else
|
||||
return parseStringBuilder(tempOutput, umbPage);
|
||||
|
||||
}
|
||||
|
||||
public Control parseStringBuilder(StringBuilder tempOutput, page umbPage) {
|
||||
public Control parseStringBuilder(StringBuilder tempOutput, page umbPage)
|
||||
{
|
||||
|
||||
Control pageContent = new Control();
|
||||
|
||||
bool stop = false;
|
||||
bool debugMode = umbraco.presentation.UmbracoContext.Current.Request.IsDebug;
|
||||
|
||||
while (!stop) {
|
||||
|
||||
while (!stop)
|
||||
{
|
||||
System.Web.HttpContext.Current.Trace.Write("template", "Begining of parsing rutine...");
|
||||
int tagIndex = tempOutput.ToString().ToLower().IndexOf("<?umbraco");
|
||||
if (tagIndex > -1) {
|
||||
if (tagIndex > -1)
|
||||
{
|
||||
String tempElementContent = "";
|
||||
pageContent.Controls.Add(new LiteralControl(tempOutput.ToString().Substring(0, tagIndex)));
|
||||
|
||||
@@ -215,13 +238,15 @@ namespace umbraco {
|
||||
Hashtable attributes = helper.ReturnAttributes(tag);
|
||||
|
||||
// Check whether it's a single tag (<?.../>) or a tag with children (<?..>...</?...>)
|
||||
if (tag.Substring(tag.Length - 2, 1) != "/" && tag.IndexOf(" ") > -1) {
|
||||
if (tag.Substring(tag.Length - 2, 1) != "/" && tag.IndexOf(" ") > -1)
|
||||
{
|
||||
String closingTag = "</" + (tag.Substring(1, tag.IndexOf(" ") - 1)) + ">";
|
||||
// Tag with children are only used when a macro is inserted by the umbraco-editor, in the
|
||||
// following format: "<?UMBRACO_MACRO ...><IMG SRC="..."..></?UMBRACO_MACRO>", so we
|
||||
// need to delete extra information inserted which is the image-tag and the closing
|
||||
// umbraco_macro tag
|
||||
if (tempOutput.ToString().IndexOf(closingTag) > -1) {
|
||||
if (tempOutput.ToString().IndexOf(closingTag) > -1)
|
||||
{
|
||||
tempOutput.Remove(0, tempOutput.ToString().IndexOf(closingTag));
|
||||
}
|
||||
}
|
||||
@@ -231,12 +256,14 @@ namespace umbraco {
|
||||
System.Web.HttpContext.Current.Trace.Write("umbTemplate", "Outputting item: " + tag);
|
||||
|
||||
// Handle umbraco macro tags
|
||||
if (tag.ToString().ToLower().IndexOf("umbraco_macro") > -1) {
|
||||
if (tag.ToString().ToLower().IndexOf("umbraco_macro") > -1)
|
||||
{
|
||||
if (debugMode)
|
||||
pageContent.Controls.Add(new LiteralControl("<div title=\"Macro Tag: '" + System.Web.HttpContext.Current.Server.HtmlEncode(tag) + "'\" style=\"border: 1px solid #009;\">"));
|
||||
|
||||
// NH: Switching to custom controls for macros
|
||||
if (UmbracoSettings.UseAspNetMasterPages) {
|
||||
if (UmbracoSettings.UseAspNetMasterPages)
|
||||
{
|
||||
umbraco.presentation.templateControls.Macro macroControl = new umbraco.presentation.templateControls.Macro();
|
||||
macroControl.Alias = helper.FindAttribute(attributes, "macroalias");
|
||||
IDictionaryEnumerator ide = attributes.GetEnumerator();
|
||||
@@ -244,7 +271,9 @@ namespace umbraco {
|
||||
if (macroControl.Attributes[ide.Key.ToString()] == null)
|
||||
macroControl.Attributes.Add(ide.Key.ToString(), ide.Value.ToString());
|
||||
pageContent.Controls.Add(macroControl);
|
||||
} else {
|
||||
}
|
||||
else
|
||||
{
|
||||
macro tempMacro;
|
||||
String macroID = helper.FindAttribute(attributes, "macroid");
|
||||
if (macroID != String.Empty)
|
||||
@@ -252,27 +281,35 @@ namespace umbraco {
|
||||
else
|
||||
tempMacro = macro.ReturnFromAlias(helper.FindAttribute(attributes, "macroalias"));
|
||||
|
||||
if (tempMacro != null) {
|
||||
if (tempMacro != null)
|
||||
{
|
||||
|
||||
try {
|
||||
try
|
||||
{
|
||||
Control c = tempMacro.renderMacro(attributes, umbPage.Elements, umbPage.PageID);
|
||||
if (c != null)
|
||||
pageContent.Controls.Add(c);
|
||||
else
|
||||
System.Web.HttpContext.Current.Trace.Warn("Template", "Result of macro " + tempMacro.Name + " is null");
|
||||
|
||||
} catch (Exception e) {
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
System.Web.HttpContext.Current.Trace.Warn("Template", "Error adding macro " + tempMacro.Name, e);
|
||||
}
|
||||
}
|
||||
}
|
||||
if (debugMode)
|
||||
pageContent.Controls.Add(new LiteralControl("</div>"));
|
||||
} else {
|
||||
if (tag.ToLower().IndexOf("umbraco_getitem") > -1) {
|
||||
}
|
||||
else
|
||||
{
|
||||
if (tag.ToLower().IndexOf("umbraco_getitem") > -1)
|
||||
{
|
||||
|
||||
// NH: Switching to custom controls for items
|
||||
if (UmbracoSettings.UseAspNetMasterPages) {
|
||||
if (UmbracoSettings.UseAspNetMasterPages)
|
||||
{
|
||||
umbraco.presentation.templateControls.Item itemControl = new umbraco.presentation.templateControls.Item();
|
||||
itemControl.Field = helper.FindAttribute(attributes, "field");
|
||||
IDictionaryEnumerator ide = attributes.GetEnumerator();
|
||||
@@ -280,23 +317,32 @@ namespace umbraco {
|
||||
if (itemControl.Attributes[ide.Key.ToString()] == null)
|
||||
itemControl.Attributes.Add(ide.Key.ToString(), ide.Value.ToString());
|
||||
pageContent.Controls.Add(itemControl);
|
||||
} else {
|
||||
try {
|
||||
if (helper.FindAttribute(attributes, "nodeId") != "" && int.Parse(helper.FindAttribute(attributes, "nodeId")) != 0) {
|
||||
}
|
||||
else
|
||||
{
|
||||
try
|
||||
{
|
||||
if (helper.FindAttribute(attributes, "nodeId") != "" && int.Parse(helper.FindAttribute(attributes, "nodeId")) != 0)
|
||||
{
|
||||
cms.businesslogic.Content c = new umbraco.cms.businesslogic.Content(int.Parse(helper.FindAttribute(attributes, "nodeId")));
|
||||
item umbItem = new item(c.getProperty(helper.FindAttribute(attributes, "field")).Value.ToString(), attributes);
|
||||
tempElementContent = umbItem.FieldContent;
|
||||
|
||||
// Check if the content is published
|
||||
if (c.nodeObjectType == cms.businesslogic.web.Document._objectType) {
|
||||
try {
|
||||
if (c.nodeObjectType == cms.businesslogic.web.Document._objectType)
|
||||
{
|
||||
try
|
||||
{
|
||||
cms.businesslogic.web.Document d = (cms.businesslogic.web.Document)c;
|
||||
if (!d.Published)
|
||||
tempElementContent = "";
|
||||
} catch { }
|
||||
}
|
||||
catch { }
|
||||
}
|
||||
|
||||
} else {
|
||||
}
|
||||
else
|
||||
{
|
||||
// NH adds Live Editing test stuff
|
||||
item umbItem = new item(umbPage.Elements, attributes);
|
||||
// item umbItem = new item(umbPage.PageElements[helper.FindAttribute(attributes, "field")].ToString(), attributes);
|
||||
@@ -306,7 +352,9 @@ namespace umbraco {
|
||||
if (debugMode)
|
||||
tempElementContent =
|
||||
"<div title=\"Field Tag: '" + System.Web.HttpContext.Current.Server.HtmlEncode(tag) + "'\" style=\"border: 1px solid #fc6;\">" + tempElementContent + "</div>";
|
||||
} catch (Exception e) {
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
System.Web.HttpContext.Current.Trace.Warn("umbracoTemplate", "Error reading element (" + helper.FindAttribute(attributes, "field") + ")", e);
|
||||
}
|
||||
}
|
||||
@@ -314,7 +362,9 @@ namespace umbraco {
|
||||
}
|
||||
tempOutput.Remove(0, tempOutput.ToString().IndexOf(">") + 1);
|
||||
tempOutput.Insert(0, tempElementContent);
|
||||
} else {
|
||||
}
|
||||
else
|
||||
{
|
||||
pageContent.Controls.Add(new LiteralControl(tempOutput.ToString()));
|
||||
break;
|
||||
}
|
||||
@@ -345,7 +395,8 @@ namespace umbraco {
|
||||
/// Replaces the found tags in the StringBuilder object, with "real content"
|
||||
/// </summary>
|
||||
/// <param name="umbPage"></param>
|
||||
public void Parse(page umbPage) {
|
||||
public void Parse(page umbPage)
|
||||
{
|
||||
System.Web.HttpContext.Current.Trace.Write("umbracoTemplate", "Start parsing");
|
||||
|
||||
// First parse for known umbraco tags
|
||||
@@ -353,25 +404,34 @@ namespace umbraco {
|
||||
// <?UMBRACO_GETITEM/> - print item from page, level, or recursive
|
||||
MatchCollection tags = Regex.Matches(templateOutput.ToString(), "<\\?UMBRACO_MACRO[^>]*/>|<\\?UMBRACO_GETITEM[^>]*/>|<\\?(?<tagName>[\\S]*)[^>]*/>", RegexOptions.IgnoreCase | RegexOptions.IgnorePatternWhitespace);
|
||||
|
||||
foreach (Match tag in tags) {
|
||||
foreach (Match tag in tags)
|
||||
{
|
||||
Hashtable attributes = helper.ReturnAttributes(tag.Value.ToString());
|
||||
|
||||
|
||||
if (tag.ToString().ToLower().IndexOf("umbraco_macro") > -1) {
|
||||
if (tag.ToString().ToLower().IndexOf("umbraco_macro") > -1)
|
||||
{
|
||||
String macroID = helper.FindAttribute(attributes, "macroid");
|
||||
if (macroID != "") {
|
||||
if (macroID != "")
|
||||
{
|
||||
macro tempMacro = getMacro(macroID);
|
||||
templateOutput.Replace(tag.Value.ToString(), tempMacro.MacroContent.ToString());
|
||||
}
|
||||
} else {
|
||||
if (tag.ToString().ToLower().IndexOf("umbraco_getitem") > -1) {
|
||||
try {
|
||||
}
|
||||
else
|
||||
{
|
||||
if (tag.ToString().ToLower().IndexOf("umbraco_getitem") > -1)
|
||||
{
|
||||
try
|
||||
{
|
||||
String tempElementContent = umbPage.Elements[helper.FindAttribute(attributes, "field")].ToString();
|
||||
MatchCollection tempMacros = Regex.Matches(tempElementContent, "<\\?UMBRACO_MACRO(?<attributes>[^>]*)><img[^>]*><\\/\\?UMBRACO_MACRO>", RegexOptions.IgnoreCase | RegexOptions.IgnorePatternWhitespace);
|
||||
foreach (Match tempMacro in tempMacros) {
|
||||
foreach (Match tempMacro in tempMacros)
|
||||
{
|
||||
Hashtable tempAttributes = helper.ReturnAttributes(tempMacro.Groups["attributes"].Value.ToString());
|
||||
String macroID = helper.FindAttribute(tempAttributes, "macroid");
|
||||
if (Convert.ToInt32(macroID) > 0) {
|
||||
if (Convert.ToInt32(macroID) > 0)
|
||||
{
|
||||
macro tempContentMacro = getMacro(macroID);
|
||||
templateOutput.Replace(tag.Value.ToString(), tempContentMacro.MacroContent.ToString());
|
||||
}
|
||||
@@ -379,7 +439,9 @@ namespace umbraco {
|
||||
}
|
||||
|
||||
templateOutput.Replace(tag.Value.ToString(), tempElementContent);
|
||||
} catch (Exception e) {
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
System.Web.HttpContext.Current.Trace.Warn("umbracoTemplate", "Error reading element (" + helper.FindAttribute(attributes, "field") + ")", e);
|
||||
}
|
||||
}
|
||||
@@ -395,12 +457,14 @@ namespace umbraco {
|
||||
|
||||
#region private methods
|
||||
|
||||
private macro getMacro(String macroID) {
|
||||
private macro getMacro(String macroID)
|
||||
{
|
||||
System.Web.HttpContext.Current.Trace.Write("umbracoTemplate", "Starting macro (" + macroID.ToString() + ")");
|
||||
return new macro(Convert.ToInt16(macroID));
|
||||
}
|
||||
|
||||
private String FindAttribute(Hashtable attributes, String key) {
|
||||
private String FindAttribute(Hashtable attributes, String key)
|
||||
{
|
||||
if (attributes[key] != null)
|
||||
return attributes[key].ToString();
|
||||
else
|
||||
@@ -410,7 +474,8 @@ namespace umbraco {
|
||||
|
||||
#endregion
|
||||
|
||||
protected static ISqlHelper SqlHelper {
|
||||
protected static ISqlHelper SqlHelper
|
||||
{
|
||||
get { return Application.SqlHelper; }
|
||||
}
|
||||
|
||||
@@ -421,7 +486,8 @@ namespace umbraco {
|
||||
return GetMasterPageName(templateID, null);
|
||||
}
|
||||
|
||||
public static string GetMasterPageName(int templateID, string templateFolder) {
|
||||
public static string GetMasterPageName(int templateID, string templateFolder)
|
||||
{
|
||||
template t = (template)templateCache["template" + templateID];
|
||||
if (t == null)
|
||||
t = new template(templateID);
|
||||
@@ -435,17 +501,23 @@ namespace umbraco {
|
||||
throw new ArgumentException(String.Format("Template with id '{0}' not found", templateID));
|
||||
}
|
||||
|
||||
public template(int templateID) {
|
||||
if (templateCache["template" + templateID.ToString()] != null) {
|
||||
public template(int templateID)
|
||||
{
|
||||
if (templateCache["template" + templateID.ToString()] != null)
|
||||
{
|
||||
template t = (template)templateCache["template" + templateID];
|
||||
this._masterTemplate = t._masterTemplate;
|
||||
this._templateAlias = t._templateAlias;
|
||||
this._templateDesign = t._templateDesign;
|
||||
this._masterTemplate = t._masterTemplate;
|
||||
this._templateName = t._templateName;
|
||||
} else {
|
||||
using (IRecordsReader templateData = SqlHelper.ExecuteReader("select nodeId, alias, master, text, design from cmsTemplate inner join umbracoNode node on node.id = cmsTemplate.nodeId where nodeId = @templateID", SqlHelper.CreateParameter("@templateID", templateID))) {
|
||||
if (templateData.Read()) {
|
||||
}
|
||||
else
|
||||
{
|
||||
using (IRecordsReader templateData = SqlHelper.ExecuteReader("select nodeId, alias, master, text, design from cmsTemplate inner join umbracoNode node on node.id = cmsTemplate.nodeId where nodeId = @templateID", SqlHelper.CreateParameter("@templateID", templateID)))
|
||||
{
|
||||
if (templateData.Read())
|
||||
{
|
||||
// Get template master and replace content where the template
|
||||
if (!templateData.IsNull("master"))
|
||||
_masterTemplate = templateData.GetInt("master");
|
||||
@@ -477,17 +549,24 @@ namespace umbraco {
|
||||
templateOutput.Append(_templateDesign);
|
||||
} else {
|
||||
if (_masterTemplate == templateID)
|
||||
System.Web.HttpContext.Current.Trace.Warn("template", "Master template is the same as the current template. It would course an endless loop!");
|
||||
templateOutput.Append(_templateDesign);
|
||||
{
|
||||
cms.businesslogic.template.Template t = cms.businesslogic.template.Template.GetTemplate(templateID);
|
||||
string templateName = (t != null) ? t.Text : string.Format("'Template with id: '{0}", templateID);
|
||||
System.Web.HttpContext.Current.Trace.Warn("template",
|
||||
String.Format("Master template is the same as the current template. It would cause an endless loop! Make sure that the current template '{0}' has another Master Template than itself. You can change this in the template editor under 'Settings'", templateName));
|
||||
templateOutput.Append(_templateDesign);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public static void ClearCachedTemplate(int templateID) {
|
||||
public static void ClearCachedTemplate(int templateID)
|
||||
{
|
||||
if (templateCache["template" + templateID.ToString()] != null)
|
||||
templateCache.Remove("template" + templateID.ToString());
|
||||
}
|
||||
|
||||
public template(String templateContent) {
|
||||
public template(String templateContent)
|
||||
{
|
||||
templateOutput.Append(templateContent);
|
||||
_masterTemplate = 0;
|
||||
}
|
||||
@@ -495,37 +574,46 @@ namespace umbraco {
|
||||
#endregion
|
||||
}
|
||||
|
||||
public class templateCacheRefresh : interfaces.ICacheRefresher {
|
||||
public class templateCacheRefresh : interfaces.ICacheRefresher
|
||||
{
|
||||
#region ICacheRefresher Members
|
||||
|
||||
public string Name {
|
||||
get {
|
||||
public string Name
|
||||
{
|
||||
get
|
||||
{
|
||||
// TODO: Add templateCacheRefresh.Name getter implementation
|
||||
return "Template cache refresher";
|
||||
}
|
||||
}
|
||||
|
||||
public Guid UniqueIdentifier {
|
||||
get {
|
||||
public Guid UniqueIdentifier
|
||||
{
|
||||
get
|
||||
{
|
||||
// TODO: Add templateCacheRefresh.UniqueIdentifier getter implementation
|
||||
return new Guid("DD12B6A0-14B9-46e8-8800-C154F74047C8");
|
||||
}
|
||||
}
|
||||
|
||||
public void RefreshAll() {
|
||||
public void RefreshAll()
|
||||
{
|
||||
// Doesn't do anything
|
||||
}
|
||||
|
||||
public void Refresh(Guid Id) {
|
||||
public void Refresh(Guid Id)
|
||||
{
|
||||
// Doesn't do anything
|
||||
}
|
||||
|
||||
void umbraco.interfaces.ICacheRefresher.Refresh(int Id) {
|
||||
void umbraco.interfaces.ICacheRefresher.Refresh(int Id)
|
||||
{
|
||||
template.ClearCachedTemplate(Id);
|
||||
}
|
||||
|
||||
//PPH remove tamplete from cache
|
||||
public void Remove(int Id) {
|
||||
public void Remove(int Id)
|
||||
{
|
||||
|
||||
template.ClearCachedTemplate(Id);
|
||||
|
||||
|
||||
@@ -51,7 +51,7 @@ namespace umbraco.cms.presentation.settings.stylesheet
|
||||
if (appPath == "/")
|
||||
appPath = "";
|
||||
lttPath.Text = "<a target='_blank' href='" + appPath + "/css/" + stylesheet.Text + ".css'>" + appPath +
|
||||
"/css/" + stylesheet.Text + ".css</a>";
|
||||
IO.SystemDirectories.Css + "/" + stylesheet.Text + ".css</a>";
|
||||
|
||||
|
||||
if (!IsPostBack)
|
||||
|
||||
@@ -1,16 +1,15 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<configuration>
|
||||
<configSections >
|
||||
<section name="urlrewritingnet" restartOnExternalChanges="true" requirePermission="false" type="UrlRewritingNet.Configuration.UrlRewriteSection, UrlRewritingNet.UrlRewriter" />
|
||||
<!--
|
||||
<configSections>
|
||||
<section name="urlrewritingnet" restartOnExternalChanges="true" requirePermission="false" type="UrlRewritingNet.Configuration.UrlRewriteSection, UrlRewritingNet.UrlRewriter" />
|
||||
<!--
|
||||
<section name="microsoft.scripting" type="Microsoft.Scripting.Hosting.Configuration.Section, Microsoft.Scripting, Version=1.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" requirePermission="false" />
|
||||
|
||||
|
||||
ASPNETAJAX ** DISABLED BY ALEX NORCLIFFE 2010 06 03 FOR COMPATIBILITY WITH RUNNING UNDER .NET 4
|
||||
USERS CAN ADD THIS THEMSELVES IF THEY WISH TO USE ASP.NET AJAX
|
||||
-->
|
||||
|
||||
<!--<sectionGroup name="system.web.extensions" type="System.Web.Configuration.SystemWebExtensionsSectionGroup, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35">
|
||||
<!--<sectionGroup name="system.web.extensions" type="System.Web.Configuration.SystemWebExtensionsSectionGroup, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35">
|
||||
<sectionGroup name="scripting" type="System.Web.Configuration.ScriptingSectionGroup, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35">
|
||||
<section name="scriptResourceHandler" type="System.Web.Configuration.ScriptingScriptResourceHandlerSection, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" requirePermission="false" allowDefinition="MachineToApplication" />
|
||||
<sectionGroup name="webServices" type="System.Web.Configuration.ScriptingWebServicesSectionGroup, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35">
|
||||
@@ -21,229 +20,207 @@
|
||||
</sectionGroup>
|
||||
</sectionGroup>
|
||||
</sectionGroup>-->
|
||||
|
||||
<sectionGroup name="applicationSettings" type="System.Configuration.ApplicationSettingsGroup, System, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<section name="umbraco.presentation.Properties.Settings" type="System.Configuration.ClientSettingsSection, System, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" requirePermission="false" />
|
||||
</sectionGroup>
|
||||
|
||||
<section name="clientDependency" type="ClientDependency.Core.Config.ClientDependencySection, ClientDependency.Core" requirePermission="false"/>
|
||||
<section name="Examine" type="Examine.Config.ExamineSettings, Examine" requirePermission="false"/>
|
||||
<section name="ExamineLuceneIndexSets" type="UmbracoExamine.Config.ExamineLuceneIndexes, UmbracoExamine" requirePermission="false"/>
|
||||
|
||||
<!-- Added in Umbraco 4.6.2 -->
|
||||
<sectionGroup name="system.web.webPages.razor" type="System.Web.WebPages.Razor.Configuration.RazorWebSectionGroup, System.Web.WebPages.Razor, Version=1.0.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35">
|
||||
<section name="host" type="System.Web.WebPages.Razor.Configuration.HostSection, System.Web.WebPages.Razor, Version=1.0.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" requirePermission="false" />
|
||||
<section name="pages" type="System.Web.WebPages.Razor.Configuration.RazorPagesSection, System.Web.WebPages.Razor, Version=1.0.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" requirePermission="false" />
|
||||
</sectionGroup>
|
||||
<!-- End of added in Umbraco 4.6.2 -->
|
||||
</configSections>
|
||||
<urlrewritingnet configSource="config\UrlRewriting.config" />
|
||||
<!-- <microsoft.scripting configSource="config\scripting.config" />-->
|
||||
<clientDependency configSource="config\ClientDependency.config" />
|
||||
<Examine configSource="config\ExamineSettings.config" />
|
||||
<ExamineLuceneIndexSets configSource="config\ExamineIndex.config" />
|
||||
|
||||
<appSettings>
|
||||
<add key="umbracoDbDSN" value="server=.\SQLEXPRESS;database=umbraco;user id=web;password=farmer" />
|
||||
<add key="umbracoConfigurationStatus" value="4.6.0.Alpha" />
|
||||
<add key="umbracoReservedUrls" value="~/config/splashes/booting.aspx,~/install/default.aspx,~/config/splashes/noNodes.aspx,~/VSEnterpriseHelper.axd" />
|
||||
<add key="umbracoReservedPaths" value="~/umbraco,~/install/" />
|
||||
<add key="umbracoContentXML" value="~/App_Data/umbraco.config" />
|
||||
<add key="umbracoStorageDirectory" value="~/App_Data" />
|
||||
<add key="umbracoPath" value="~/umbraco" />
|
||||
<add key="umbracoEnableStat" value="false" />
|
||||
<add key="umbracoHideTopLevelNodeFromPath" value="true" />
|
||||
<add key="umbracoEditXhtmlMode" value="true" />
|
||||
<add key="umbracoUseDirectoryUrls" value="false" />
|
||||
<add key="umbracoDebugMode" value="true" />
|
||||
<add key="umbracoTimeOutInMinutes" value="20" />
|
||||
<add key="umbracoVersionCheckPeriod" value="7" />
|
||||
<add key="umbracoDisableXsltExtensions" value="true" />
|
||||
<add key="umbracoDefaultUILanguage" value="en" />
|
||||
<add key="umbracoProfileUrl" value="profiler" />
|
||||
<add key="umbracoUseSSL" value="false" />
|
||||
<add key="umbracoUseMediumTrust" value="false" />
|
||||
|
||||
<!--
|
||||
<sectionGroup name="applicationSettings" type="System.Configuration.ApplicationSettingsGroup, System, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<section name="umbraco.presentation.Properties.Settings" type="System.Configuration.ClientSettingsSection, System, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" requirePermission="false" />
|
||||
</sectionGroup>
|
||||
<section name="clientDependency" type="ClientDependency.Core.Config.ClientDependencySection, ClientDependency.Core" requirePermission="false" />
|
||||
<section name="Examine" type="Examine.Config.ExamineSettings, Examine" requirePermission="false" />
|
||||
<section name="ExamineLuceneIndexSets" type="UmbracoExamine.Config.ExamineLuceneIndexes, UmbracoExamine" requirePermission="false" />
|
||||
<!-- Added in Umbraco 4.6.2 -->
|
||||
<sectionGroup name="system.web.webPages.razor" type="System.Web.WebPages.Razor.Configuration.RazorWebSectionGroup, System.Web.WebPages.Razor, Version=1.0.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35">
|
||||
<section name="host" type="System.Web.WebPages.Razor.Configuration.HostSection, System.Web.WebPages.Razor, Version=1.0.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" requirePermission="false" />
|
||||
<section name="pages" type="System.Web.WebPages.Razor.Configuration.RazorPagesSection, System.Web.WebPages.Razor, Version=1.0.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" requirePermission="false" />
|
||||
</sectionGroup>
|
||||
<!-- End of added in Umbraco 4.6.2 -->
|
||||
</configSections>
|
||||
<urlrewritingnet configSource="config\UrlRewriting.config" />
|
||||
<!-- <microsoft.scripting configSource="config\scripting.config" />-->
|
||||
<clientDependency configSource="config\ClientDependency.config" />
|
||||
<Examine configSource="config\ExamineSettings.config" />
|
||||
<ExamineLuceneIndexSets configSource="config\ExamineIndex.config" />
|
||||
<appSettings>
|
||||
<add key="umbracoDbDSN" value="server=.\sqlexpress;database=v47;user id=DBUSER;password=DBPASSWORD" />
|
||||
<add key="umbracoConfigurationStatus" value="4.7.0.beta" />
|
||||
<add key="umbracoReservedUrls" value="~/config/splashes/booting.aspx,~/install/default.aspx,~/config/splashes/noNodes.aspx,~/VSEnterpriseHelper.axd" />
|
||||
<add key="umbracoReservedPaths" value="~/umbraco,~/install/" />
|
||||
<add key="umbracoContentXML" value="~/App_Data/umbraco.config" />
|
||||
<add key="umbracoStorageDirectory" value="~/App_Data" />
|
||||
<add key="umbracoPath" value="~/umbraco" />
|
||||
<add key="umbracoEnableStat" value="false" />
|
||||
<add key="umbracoHideTopLevelNodeFromPath" value="true" />
|
||||
<add key="umbracoEditXhtmlMode" value="true" />
|
||||
<add key="umbracoUseDirectoryUrls" value="false" />
|
||||
<add key="umbracoDebugMode" value="true" />
|
||||
<add key="umbracoTimeOutInMinutes" value="20" />
|
||||
<add key="umbracoVersionCheckPeriod" value="7" />
|
||||
<add key="umbracoDisableXsltExtensions" value="true" />
|
||||
<add key="umbracoDefaultUILanguage" value="en" />
|
||||
<add key="umbracoProfileUrl" value="profiler" />
|
||||
<add key="umbracoUseSSL" value="false" />
|
||||
<add key="umbracoUseMediumTrust" value="false" />
|
||||
<add key="umbracoCssDirectory" value="/css"></add>
|
||||
<!--
|
||||
Set this to true to enable storing the xml cache locally to the IIS server even if the app files are stored centrally on a SAN/NAS
|
||||
Alex Norcliffe 2010 02 for 4.1
|
||||
-->
|
||||
<add key="umbracoContentXMLUseLocalTemp" value="false"/>
|
||||
|
||||
<!-- Added in Umbraco 4.6.2 -->
|
||||
<add key="webpages:Enabled" value="false"/>
|
||||
<add key="enableSimpleMembership" value="false"/>
|
||||
<add key="autoFormsAuthentication" value="false"/>
|
||||
<!-- End of added in Umbraco 4.6.2 -->
|
||||
</appSettings>
|
||||
<system.net>
|
||||
<mailSettings>
|
||||
<smtp>
|
||||
<network host="127.0.0.1" userName="username" password="password" />
|
||||
</smtp>
|
||||
</mailSettings>
|
||||
</system.net>
|
||||
|
||||
<connectionStrings>
|
||||
<remove name="LocalSqlServer" />
|
||||
<!--<add name="LocalSqlServer" connectionString="server=.\sqlexpress;database=aspnetdb;user id=DBUSER;password=DBPASSWORD" providerName="System.Data.SqlClient"/>-->
|
||||
</connectionStrings>
|
||||
<system.web>
|
||||
<httpRuntime requestValidationMode="2.0" />
|
||||
<customErrors mode="Off" />
|
||||
<trace enabled="true" requestLimit="10" pageOutput="false" traceMode="SortByTime" localOnly="true" />
|
||||
<sessionState mode="InProc" stateConnectionString="tcpip=127.0.0.1:42424" sqlConnectionString="data source=127.0.0.1;Trusted_Connection=yes" cookieless="false" timeout="20" />
|
||||
<globalization requestEncoding="UTF-8" responseEncoding="UTF-8" />
|
||||
<xhtmlConformance mode="Strict" />
|
||||
<pages enableEventValidation="false">
|
||||
<!-- ASPNETAJAX -->
|
||||
<controls>
|
||||
<add tagPrefix="asp" namespace="System.Web.UI" assembly="System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" />
|
||||
<add tagPrefix="umbraco" namespace="umbraco.presentation.templateControls" assembly="umbraco" />
|
||||
<add tagPrefix="asp" namespace="System.Web.UI.WebControls" assembly="System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" />
|
||||
</controls>
|
||||
</pages>
|
||||
<httpModules>
|
||||
<!-- URL REWRTIER -->
|
||||
<add name="UrlRewriteModule" type="UrlRewritingNet.Web.UrlRewriteModule, UrlRewritingNet.UrlRewriter" />
|
||||
<add name="umbracoRequestModule" type="umbraco.presentation.requestModule" />
|
||||
<!-- UMBRACO -->
|
||||
<add name="viewstateMoverModule" type="umbraco.presentation.viewstateMoverModule, umbraco" />
|
||||
<add name="umbracoBaseRequestModule" type="umbraco.presentation.umbracobase.requestModule, umbraco" />
|
||||
<!-- ASPNETAJAX -->
|
||||
<add name="ScriptModule" type="System.Web.Handlers.ScriptModule, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/>
|
||||
<!-- CLIENT DEPENDENCY -->
|
||||
<add name="ClientDependencyModule" type="ClientDependency.Core.Module.ClientDependencyModule, ClientDependency.Core"/>
|
||||
</httpModules>
|
||||
<httpHandlers>
|
||||
<remove verb="*" path="*.asmx"/>
|
||||
<add verb="*" path="*.asmx" validate="false" type="System.Web.Script.Services.ScriptHandlerFactory, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/>
|
||||
<add verb="*" path="*_AppService.axd" validate="false" type="System.Web.Script.Services.ScriptHandlerFactory, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/>
|
||||
<add verb="GET,HEAD" path="ScriptResource.axd" type="System.Web.Handlers.ScriptResourceHandler, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" validate="false"/>
|
||||
<!-- UMBRACO CHANNELS -->
|
||||
<add verb="*" path="umbraco/channels.aspx" type="umbraco.presentation.channels.api, umbraco" />
|
||||
<add verb="*" path="umbraco/channels/word.aspx" type="umbraco.presentation.channels.wordApi, umbraco" />
|
||||
<!-- CLIENT DEPENDENCY -->
|
||||
<add verb="*" path="DependencyHandler.axd" type="ClientDependency.Core.CompositeFiles.CompositeDependencyHandler, ClientDependency.Core "/>
|
||||
<!-- SPELL CHECKER -->
|
||||
<add verb="GET,HEAD,POST" path="GoogleSpellChecker.ashx" type="umbraco.presentation.umbraco_client.tinymce3.plugins.spellchecker.GoogleSpellChecker,umbraco" />
|
||||
</httpHandlers>
|
||||
|
||||
<compilation defaultLanguage="c#" debug="true" batch="false">
|
||||
<assemblies>
|
||||
<!-- ASPNETAJAX -->
|
||||
<add assembly="System.Design, Version=2.0.0.0, Culture=neutral, PublicKeyToken=B03F5F7F11D50A3A" />
|
||||
<add assembly="System.Core, Version=3.5.0.0, Culture=neutral, PublicKeyToken=B77A5C561934E089" />
|
||||
|
||||
<add assembly="System.Xml.Linq, Version=3.5.0.0, Culture=neutral, PublicKeyToken=B77A5C561934E089" />
|
||||
<add assembly="System.Data.DataSetExtensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=B77A5C561934E089" />
|
||||
|
||||
<add assembly="System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" />
|
||||
<add assembly="System.Web.Extensions.Design, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" />
|
||||
|
||||
<add assembly="System.Web.Abstractions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" />
|
||||
<!--<add assembly="Microsoft.Scripting, Version=1.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" /> -->
|
||||
</assemblies>
|
||||
|
||||
<!-- Added in Umbraco 4.6.2 -->
|
||||
<buildProviders>
|
||||
<add extension=".cshtml" type="umbraco.MacroEngines.RazorBuildProvider, umbraco.MacroEngines"/>
|
||||
<add extension=".vbhtml" type="umbraco.MacroEngines.RazorBuildProvider, umbraco.MacroEngines"/>
|
||||
<add extension=".razor" type="umbraco.MacroEngines.RazorBuildProvider, umbraco.MacroEngines"/>
|
||||
</buildProviders>
|
||||
<!-- End of added in Umbraco 4.6.2 -->
|
||||
</compilation>
|
||||
|
||||
<authentication mode="Forms">
|
||||
<forms name="yourAuthCookie" loginUrl="login.aspx" protection="All" path="/" />
|
||||
</authentication>
|
||||
<authorization>
|
||||
<allow users="?" />
|
||||
</authorization>
|
||||
<!-- Membership Provider -->
|
||||
<membership defaultProvider="UmbracoMembershipProvider" userIsOnlineTimeWindow="15">
|
||||
<providers>
|
||||
<clear />
|
||||
<add name="UmbracoMembershipProvider" type="umbraco.providers.members.UmbracoMembershipProvider" enablePasswordRetrieval="false" enablePasswordReset="false" requiresQuestionAndAnswer="false" defaultMemberTypeAlias="Another Type" passwordFormat="Hashed" />
|
||||
<add name="UsersMembershipProvider" type="umbraco.providers.UsersMembershipProvider" enablePasswordRetrieval="false" enablePasswordReset="false" requiresQuestionAndAnswer="false" passwordFormat="Hashed" />
|
||||
</providers>
|
||||
</membership>
|
||||
<!-- added by NH to support membership providers in access layer -->
|
||||
<roleManager enabled="true" defaultProvider="UmbracoRoleProvider">
|
||||
<providers>
|
||||
<clear />
|
||||
<add name="UmbracoRoleProvider" type="umbraco.providers.members.UmbracoRoleProvider" />
|
||||
</providers>
|
||||
</roleManager>
|
||||
<!-- Sitemap provider-->
|
||||
<siteMap defaultProvider="UmbracoSiteMapProvider" enabled="true">
|
||||
<providers>
|
||||
<clear />
|
||||
<add name="UmbracoSiteMapProvider" type="umbraco.presentation.nodeFactory.UmbracoSiteMapProvider" defaultDescriptionAlias="description" securityTrimmingEnabled="true" />
|
||||
</providers>
|
||||
</siteMap>
|
||||
</system.web>
|
||||
|
||||
<system.webServer>
|
||||
<validation validateIntegratedModeConfiguration="false" />
|
||||
<modules>
|
||||
<remove name="ScriptModule" />
|
||||
<remove name="UrlRewriteModule" />
|
||||
<remove name="umbracoRequestModule" />
|
||||
<remove name="viewstateMoverModule" />
|
||||
<remove name="umbracoBaseRequestModule" />
|
||||
<remove name="ClientDependencyModule" />
|
||||
<!-- Needed for login/membership to work on homepage (as per http://stackoverflow.com/questions/218057/httpcontext-current-session-is-null-when-routing-requests) -->
|
||||
<remove name="FormsAuthentication" />
|
||||
|
||||
<add name="UrlRewriteModule" type="UrlRewritingNet.Web.UrlRewriteModule, UrlRewritingNet.UrlRewriter" />
|
||||
<add name="umbracoRequestModule" type="umbraco.presentation.requestModule" />
|
||||
<add name="viewstateMoverModule" type="umbraco.presentation.viewstateMoverModule" />
|
||||
<add name="umbracoBaseRequestModule" type="umbraco.presentation.umbracobase.requestModule" />
|
||||
<add name="ScriptModule" preCondition="managedHandler" type="System.Web.Handlers.ScriptModule, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" />
|
||||
<add name="ClientDependencyModule" type="ClientDependency.Core.Module.ClientDependencyModule, ClientDependency.Core"/>
|
||||
<!-- Needed for login/membership to work on homepage (as per http://stackoverflow.com/questions/218057/httpcontext-current-session-is-null-when-routing-requests) -->
|
||||
<add name="FormsAuthentication" type="System.Web.Security.FormsAuthenticationModule"/>
|
||||
</modules>
|
||||
|
||||
<handlers accessPolicy="Read, Write, Script, Execute">
|
||||
<remove name="WebServiceHandlerFactory-Integrated" />
|
||||
<remove name="ScriptHandlerFactory" />
|
||||
<remove name="ScriptHandlerFactoryAppServices" />
|
||||
<remove name="ScriptResource" />
|
||||
<remove name="Channels" />
|
||||
<remove name="Channels_Word" />
|
||||
<remove name="ClientDependency" />
|
||||
<remove name="SpellChecker" />
|
||||
|
||||
<add name="ScriptHandlerFactory" verb="*" path="*.asmx" preCondition="integratedMode" type="System.Web.Script.Services.ScriptHandlerFactory, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" />
|
||||
<add name="ScriptHandlerFactoryAppServices" verb="*" path="*_AppService.axd" preCondition="integratedMode" type="System.Web.Script.Services.ScriptHandlerFactory, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" />
|
||||
<add name="ScriptResource" verb="GET,HEAD" path="ScriptResource.axd" preCondition="integratedMode" type="System.Web.Handlers.ScriptResourceHandler, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" />
|
||||
<add verb="*" name="Channels" preCondition="integratedMode" path="umbraco/channels.aspx" type="umbraco.presentation.channels.api, umbraco" />
|
||||
<add verb="*" name="Channels_Word" preCondition="integratedMode" path="umbraco/channels/word.aspx" type="umbraco.presentation.channels.wordApi, umbraco" />
|
||||
<add verb="*" name="ClientDependency" preCondition="integratedMode" path="DependencyHandler.axd" type="ClientDependency.Core.CompositeFiles.CompositeDependencyHandler, ClientDependency.Core "/>
|
||||
<add verb="GET,HEAD,POST" preCondition="integratedMode" name="SpellChecker" path="GoogleSpellChecker.ashx" type="umbraco.presentation.umbraco_client.tinymce3.plugins.spellchecker.GoogleSpellChecker,umbraco"/>
|
||||
</handlers>
|
||||
|
||||
<staticContent>
|
||||
<mimeMap fileExtension=".air" mimeType="application/vnd.adobe.air-application-installer-package+zip" />
|
||||
</staticContent>
|
||||
|
||||
</system.webServer>
|
||||
|
||||
|
||||
<system.codedom>
|
||||
<compilers>
|
||||
<compiler language="c#;cs;csharp" extension=".cs" type="Microsoft.CSharp.CSharpCodeProvider,System, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" warningLevel="4">
|
||||
<providerOption name="CompilerVersion" value="v3.5" />
|
||||
<providerOption name="WarnAsError" value="false" />
|
||||
</compiler>
|
||||
</compilers>
|
||||
</system.codedom>
|
||||
|
||||
|
||||
<runtime>
|
||||
<!-- <assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
|
||||
<add key="umbracoContentXMLUseLocalTemp" value="false" />
|
||||
<!-- Added in Umbraco 4.6.2 -->
|
||||
<add key="webpages:Enabled" value="false" />
|
||||
<add key="enableSimpleMembership" value="false" />
|
||||
<add key="autoFormsAuthentication" value="false" />
|
||||
<!-- End of added in Umbraco 4.6.2 -->
|
||||
</appSettings>
|
||||
<system.net>
|
||||
<mailSettings>
|
||||
<smtp>
|
||||
<network host="127.0.0.1" userName="username" password="password" />
|
||||
</smtp>
|
||||
</mailSettings>
|
||||
</system.net>
|
||||
<connectionStrings>
|
||||
<remove name="LocalSqlServer" />
|
||||
<!--<add name="LocalSqlServer" connectionString="server=.\sqlexpress;database=aspnetdb;user id=DBUSER;password=DBPASSWORD" providerName="System.Data.SqlClient"/>-->
|
||||
</connectionStrings>
|
||||
<system.web>
|
||||
<httpRuntime requestValidationMode="2.0" />
|
||||
<customErrors mode="Off" />
|
||||
<trace enabled="true" requestLimit="10" pageOutput="false" traceMode="SortByTime" localOnly="true" />
|
||||
<sessionState mode="InProc" stateConnectionString="tcpip=127.0.0.1:42424" sqlConnectionString="data source=127.0.0.1;Trusted_Connection=yes" cookieless="false" timeout="20" />
|
||||
<globalization requestEncoding="UTF-8" responseEncoding="UTF-8" />
|
||||
<xhtmlConformance mode="Strict" />
|
||||
<pages enableEventValidation="false">
|
||||
<!-- ASPNETAJAX -->
|
||||
<controls>
|
||||
<add tagPrefix="asp" namespace="System.Web.UI" assembly="System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" />
|
||||
<add tagPrefix="umbraco" namespace="umbraco.presentation.templateControls" assembly="umbraco" />
|
||||
<add tagPrefix="asp" namespace="System.Web.UI.WebControls" assembly="System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" />
|
||||
</controls>
|
||||
</pages>
|
||||
<httpModules>
|
||||
<!-- URL REWRTIER -->
|
||||
<add name="UrlRewriteModule" type="UrlRewritingNet.Web.UrlRewriteModule, UrlRewritingNet.UrlRewriter" />
|
||||
<add name="umbracoRequestModule" type="umbraco.presentation.requestModule" />
|
||||
<!-- UMBRACO -->
|
||||
<add name="viewstateMoverModule" type="umbraco.presentation.viewstateMoverModule, umbraco" />
|
||||
<add name="umbracoBaseRequestModule" type="umbraco.presentation.umbracobase.requestModule, umbraco" />
|
||||
<!-- ASPNETAJAX -->
|
||||
<add name="ScriptModule" type="System.Web.Handlers.ScriptModule, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" />
|
||||
<!-- CLIENT DEPENDENCY -->
|
||||
<add name="ClientDependencyModule" type="ClientDependency.Core.Module.ClientDependencyModule, ClientDependency.Core" />
|
||||
</httpModules>
|
||||
<httpHandlers>
|
||||
<remove verb="*" path="*.asmx" />
|
||||
<add verb="*" path="*.asmx" validate="false" type="System.Web.Script.Services.ScriptHandlerFactory, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" />
|
||||
<add verb="*" path="*_AppService.axd" validate="false" type="System.Web.Script.Services.ScriptHandlerFactory, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" />
|
||||
<add verb="GET,HEAD" path="ScriptResource.axd" type="System.Web.Handlers.ScriptResourceHandler, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" validate="false" />
|
||||
<!-- UMBRACO CHANNELS -->
|
||||
<add verb="*" path="umbraco/channels.aspx" type="umbraco.presentation.channels.api, umbraco" />
|
||||
<add verb="*" path="umbraco/channels/word.aspx" type="umbraco.presentation.channels.wordApi, umbraco" />
|
||||
<!-- CLIENT DEPENDENCY -->
|
||||
<add verb="*" path="DependencyHandler.axd" type="ClientDependency.Core.CompositeFiles.CompositeDependencyHandler, ClientDependency.Core " />
|
||||
<!-- SPELL CHECKER -->
|
||||
<add verb="GET,HEAD,POST" path="GoogleSpellChecker.ashx" type="umbraco.presentation.umbraco_client.tinymce3.plugins.spellchecker.GoogleSpellChecker,umbraco" />
|
||||
</httpHandlers>
|
||||
<compilation defaultLanguage="c#" debug="true" batch="false">
|
||||
<assemblies>
|
||||
<!-- ASPNETAJAX -->
|
||||
<add assembly="System.Design, Version=2.0.0.0, Culture=neutral, PublicKeyToken=B03F5F7F11D50A3A" />
|
||||
<add assembly="System.Core, Version=3.5.0.0, Culture=neutral, PublicKeyToken=B77A5C561934E089" />
|
||||
<add assembly="System.Xml.Linq, Version=3.5.0.0, Culture=neutral, PublicKeyToken=B77A5C561934E089" />
|
||||
<add assembly="System.Data.DataSetExtensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=B77A5C561934E089" />
|
||||
<add assembly="System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" />
|
||||
<add assembly="System.Web.Extensions.Design, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" />
|
||||
<add assembly="System.Web.Abstractions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" />
|
||||
<!--<add assembly="Microsoft.Scripting, Version=1.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" /> -->
|
||||
</assemblies>
|
||||
<!-- Added in Umbraco 4.6.2 -->
|
||||
<buildProviders>
|
||||
<add extension=".cshtml" type="umbraco.MacroEngines.RazorBuildProvider, umbraco.MacroEngines" />
|
||||
<add extension=".vbhtml" type="umbraco.MacroEngines.RazorBuildProvider, umbraco.MacroEngines" />
|
||||
<add extension=".razor" type="umbraco.MacroEngines.RazorBuildProvider, umbraco.MacroEngines" />
|
||||
</buildProviders>
|
||||
<!-- End of added in Umbraco 4.6.2 -->
|
||||
</compilation>
|
||||
<authentication mode="Forms">
|
||||
<forms name="yourAuthCookie" loginUrl="login.aspx" protection="All" path="/" />
|
||||
</authentication>
|
||||
<authorization>
|
||||
<allow users="?" />
|
||||
</authorization>
|
||||
<!-- Membership Provider -->
|
||||
<membership defaultProvider="UmbracoMembershipProvider" userIsOnlineTimeWindow="15">
|
||||
<providers>
|
||||
<clear />
|
||||
<add name="UmbracoMembershipProvider" type="umbraco.providers.members.UmbracoMembershipProvider" enablePasswordRetrieval="false" enablePasswordReset="false" requiresQuestionAndAnswer="false" defaultMemberTypeAlias="Another Type" passwordFormat="Hashed" />
|
||||
<add name="UsersMembershipProvider" type="umbraco.providers.UsersMembershipProvider" enablePasswordRetrieval="false" enablePasswordReset="false" requiresQuestionAndAnswer="false" passwordFormat="Hashed" />
|
||||
</providers>
|
||||
</membership>
|
||||
<!-- added by NH to support membership providers in access layer -->
|
||||
<roleManager enabled="true" defaultProvider="UmbracoRoleProvider">
|
||||
<providers>
|
||||
<clear />
|
||||
<add name="UmbracoRoleProvider" type="umbraco.providers.members.UmbracoRoleProvider" />
|
||||
</providers>
|
||||
</roleManager>
|
||||
<!-- Sitemap provider-->
|
||||
<siteMap defaultProvider="UmbracoSiteMapProvider" enabled="true">
|
||||
<providers>
|
||||
<clear />
|
||||
<add name="UmbracoSiteMapProvider" type="umbraco.presentation.nodeFactory.UmbracoSiteMapProvider" defaultDescriptionAlias="description" securityTrimmingEnabled="true" />
|
||||
</providers>
|
||||
</siteMap>
|
||||
</system.web>
|
||||
<system.webServer>
|
||||
<validation validateIntegratedModeConfiguration="false" />
|
||||
<modules>
|
||||
<remove name="ScriptModule" />
|
||||
<remove name="UrlRewriteModule" />
|
||||
<remove name="umbracoRequestModule" />
|
||||
<remove name="viewstateMoverModule" />
|
||||
<remove name="umbracoBaseRequestModule" />
|
||||
<remove name="ClientDependencyModule" />
|
||||
<!-- Needed for login/membership to work on homepage (as per http://stackoverflow.com/questions/218057/httpcontext-current-session-is-null-when-routing-requests) -->
|
||||
<remove name="FormsAuthentication" />
|
||||
<add name="UrlRewriteModule" type="UrlRewritingNet.Web.UrlRewriteModule, UrlRewritingNet.UrlRewriter" />
|
||||
<add name="umbracoRequestModule" type="umbraco.presentation.requestModule" />
|
||||
<add name="viewstateMoverModule" type="umbraco.presentation.viewstateMoverModule" />
|
||||
<add name="umbracoBaseRequestModule" type="umbraco.presentation.umbracobase.requestModule" />
|
||||
<add name="ScriptModule" preCondition="managedHandler" type="System.Web.Handlers.ScriptModule, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" />
|
||||
<add name="ClientDependencyModule" type="ClientDependency.Core.Module.ClientDependencyModule, ClientDependency.Core" />
|
||||
<!-- Needed for login/membership to work on homepage (as per http://stackoverflow.com/questions/218057/httpcontext-current-session-is-null-when-routing-requests) -->
|
||||
<add name="FormsAuthentication" type="System.Web.Security.FormsAuthenticationModule" />
|
||||
</modules>
|
||||
<handlers accessPolicy="Read, Write, Script, Execute">
|
||||
<remove name="WebServiceHandlerFactory-Integrated" />
|
||||
<remove name="ScriptHandlerFactory" />
|
||||
<remove name="ScriptHandlerFactoryAppServices" />
|
||||
<remove name="ScriptResource" />
|
||||
<remove name="Channels" />
|
||||
<remove name="Channels_Word" />
|
||||
<remove name="ClientDependency" />
|
||||
<remove name="SpellChecker" />
|
||||
<add name="ScriptHandlerFactory" verb="*" path="*.asmx" preCondition="integratedMode" type="System.Web.Script.Services.ScriptHandlerFactory, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" />
|
||||
<add name="ScriptHandlerFactoryAppServices" verb="*" path="*_AppService.axd" preCondition="integratedMode" type="System.Web.Script.Services.ScriptHandlerFactory, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" />
|
||||
<add name="ScriptResource" verb="GET,HEAD" path="ScriptResource.axd" preCondition="integratedMode" type="System.Web.Handlers.ScriptResourceHandler, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" />
|
||||
<add verb="*" name="Channels" preCondition="integratedMode" path="umbraco/channels.aspx" type="umbraco.presentation.channels.api, umbraco" />
|
||||
<add verb="*" name="Channels_Word" preCondition="integratedMode" path="umbraco/channels/word.aspx" type="umbraco.presentation.channels.wordApi, umbraco" />
|
||||
<add verb="*" name="ClientDependency" preCondition="integratedMode" path="DependencyHandler.axd" type="ClientDependency.Core.CompositeFiles.CompositeDependencyHandler, ClientDependency.Core " />
|
||||
<add verb="GET,HEAD,POST" preCondition="integratedMode" name="SpellChecker" path="GoogleSpellChecker.ashx" type="umbraco.presentation.umbraco_client.tinymce3.plugins.spellchecker.GoogleSpellChecker,umbraco" />
|
||||
</handlers>
|
||||
<staticContent>
|
||||
<mimeMap fileExtension=".air" mimeType="application/vnd.adobe.air-application-installer-package+zip" />
|
||||
</staticContent>
|
||||
</system.webServer>
|
||||
<system.codedom>
|
||||
<compilers>
|
||||
<compiler language="c#;cs;csharp" extension=".cs" type="Microsoft.CSharp.CSharpCodeProvider,System, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" warningLevel="4">
|
||||
<providerOption name="CompilerVersion" value="v3.5" />
|
||||
<providerOption name="WarnAsError" value="false" />
|
||||
</compiler>
|
||||
</compilers>
|
||||
</system.codedom>
|
||||
<runtime>
|
||||
<!-- <assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
|
||||
<dependentAssembly>
|
||||
<assemblyIdentity name="System.Web.Extensions" publicKeyToken="31bf3856ad364e35"/>
|
||||
<bindingRedirect oldVersion="1.0.0.0-1.1.0.0" newVersion="3.5.0.0"/>
|
||||
@@ -254,20 +231,17 @@
|
||||
</dependentAssembly>
|
||||
</assemblyBinding>
|
||||
-->
|
||||
</runtime>
|
||||
|
||||
<!-- Added in Umbraco 4.6.2 -->
|
||||
<system.web.webPages.razor>
|
||||
<!--<host factoryType="umbraco.MacroEngines.RazorUmbracoFactory, umbraco.MacroEngines"/>-->
|
||||
<pages pageBaseType="umbraco.MacroEngines.DynamicNodeContext">
|
||||
<namespaces>
|
||||
<add namespace="Microsoft.Web.Helpers" />
|
||||
<add namespace="umbraco" />
|
||||
<add namespace="Examine" />
|
||||
</namespaces>
|
||||
</pages>
|
||||
</system.web.webPages.razor>
|
||||
<!-- End of added in Umbraco 4.6.2 -->
|
||||
|
||||
|
||||
</runtime>
|
||||
<!-- Added in Umbraco 4.6.2 -->
|
||||
<system.web.webPages.razor>
|
||||
<!--<host factoryType="umbraco.MacroEngines.RazorUmbracoFactory, umbraco.MacroEngines"/>-->
|
||||
<pages pageBaseType="umbraco.MacroEngines.DynamicNodeContext">
|
||||
<namespaces>
|
||||
<add namespace="Microsoft.Web.Helpers" />
|
||||
<add namespace="umbraco" />
|
||||
<add namespace="Examine" />
|
||||
</namespaces>
|
||||
</pages>
|
||||
</system.web.webPages.razor>
|
||||
<!-- End of added in Umbraco 4.6.2 -->
|
||||
</configuration>
|
||||
Reference in New Issue
Block a user