Fixes: #U4-1844, #U4-1730, #U4-1843

This commit is contained in:
Shannon Deminick
2013-03-06 04:12:28 +06:00
parent 9b6d498cf7
commit d48e339b81
4 changed files with 85 additions and 11 deletions

View File

@@ -1,4 +1,6 @@
using System;
using System.Collections.Generic;
using System.ComponentModel;
using Umbraco.Core.Models;
namespace Umbraco.Web.Models
@@ -9,14 +11,38 @@ namespace Umbraco.Web.Models
public class PartialViewMacroModel
{
public PartialViewMacroModel(IPublishedContent page,
int macroId,
string macroAlias,
string macroName,
IDictionary<string, object> macroParams)
{
Content = page;
MacroParameters = macroParams;
MacroName = macroName;
MacroAlias = macroAlias;
MacroId = macroId;
}
[EditorBrowsable(EditorBrowsableState.Never)]
[Obsolete("Use the constructor accepting the macro id instead")]
public PartialViewMacroModel(IPublishedContent page, IDictionary<string, object> macroParams)
{
CurrentPage = page;
Content = page;
MacroParameters = macroParams;
}
public IPublishedContent CurrentPage { get; private set; }
[EditorBrowsable(EditorBrowsableState.Never)]
[Obsolete("Use the Content property instead")]
public IPublishedContent CurrentPage
{
get { return Content; }
}
public IPublishedContent Content { get; private set; }
public string MacroName { get; private set; }
public string MacroAlias { get; private set; }
public int MacroId { get; private set; }
public IDictionary<string, object> MacroParameters { get; private set; }
}