Fixes: #U4-1844, #U4-1730, #U4-1843
This commit is contained in:
@@ -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; }
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user