Port 7.7 - WIP

This commit is contained in:
Stephan
2017-09-12 16:22:16 +02:00
parent 1c96df83cd
commit 96c08f24ee
176 changed files with 5490 additions and 4892 deletions

View File

@@ -525,9 +525,11 @@ namespace Umbraco.Web.Macros
attributeValue = context?.Request.GetCookieValue(name);
break;
case '#':
if (pageElements == null) pageElements = GetPageElements();
attributeValue = pageElements[name]?.ToString();
break;
case '$':
if (pageElements == null) pageElements = GetPageElements();
attributeValue = pageElements[name]?.ToString();
if (string.IsNullOrEmpty(attributeValue))
attributeValue = ParseAttributeOnParents(pageElements, name);
@@ -561,6 +563,14 @@ namespace Umbraco.Web.Macros
return value;
}
private static IDictionary GetPageElements()
{
IDictionary pageElements = null;
if (HttpContext.Current.Items["pageElements"] != null)
pageElements = (IDictionary)HttpContext.Current.Items["pageElements"];
return pageElements;
}
#endregion
#region RTE macros