View Source
Class MacroRenderingController
API controller to deal with Macro data
Inheritance
System.Object
Assembly: Umbraco.Web.dll
Syntax
[PluginController("UmbracoApi")]
public class MacroRenderingController : UmbracoAuthorizedJsonController, IDiscoverable, IRequiresSessionState
Constructors
View Source
MacroRenderingController(IUmbracoComponentRenderer, IVariationContextAccessor, IMacroService, IContentService)
Declaration
public MacroRenderingController(IUmbracoComponentRenderer componentRenderer, IVariationContextAccessor variationContextAccessor, IMacroService macroService, IContentService contentService)
Parameters
Methods
View Source
CreatePartialViewMacroWithFile(MacroRenderingController.CreatePartialViewMacroWithFileModel)
Declaration
public HttpResponseMessage CreatePartialViewMacroWithFile(MacroRenderingController.CreatePartialViewMacroWithFileModel model)
Parameters
Returns
Type |
Description |
HttpResponseMessage |
|
View Source
GetMacroParameters(Int32)
Gets the macro parameters to be filled in for a particular macro
Declaration
public IEnumerable<MacroParameter> GetMacroParameters(int macroId)
Parameters
Type |
Name |
Description |
System.Int32 |
macroId |
|
Returns
Type |
Description |
System.Collections.Generic.IEnumerable<MacroParameter> |
|
View Source
GetMacroResultAsHtmlForEditor(String, Int32, IDictionary<String, Object>)
Declaration
public HttpResponseMessage GetMacroResultAsHtmlForEditor(string macroAlias, int pageId, IDictionary<string, object> macroParams)
Parameters
Type |
Name |
Description |
System.String |
macroAlias |
|
System.Int32 |
pageId |
|
System.Collections.Generic.IDictionary<System.String, System.Object> |
macroParams |
|
Returns
Type |
Description |
HttpResponseMessage |
|
View Source
GetMacroResultAsHtmlForEditor(MacroRenderingController.MacroParameterModel)
Gets a rendered macro as HTML for rendering in the rich text editor.
Using HTTP POST instead of GET allows for more parameters to be passed as it's not dependent on URL-length limitations like GET.
The method using GET is kept to maintain backwards compatibility
Declaration
public HttpResponseMessage GetMacroResultAsHtmlForEditor(MacroRenderingController.MacroParameterModel model)
Parameters
Returns
Type |
Description |
HttpResponseMessage |
|