Press Ctrl / CMD + C to copy this to your clipboard.
This post will be reported to the moderators as potential spam to be looked at
Hi all,
how to add parameter in macro?
thanks
Hi Alex,
if you need to add a parameter for your macro you should add it in the "developer" section under the "Macro" folder. select the macro you want tom add the parameter and select parameter from parameter tab.
hope this help
Regards,
Samira
Hi Alex. As Samira mentioned, and when you want to read your macro in a Marco Partial View, use:
@{ var parameter = @Model.MacroParameters["alias"].ToString() }
Where "alias" is the alias defined for your macro parameter.
Best of luck to you, let us know if there is any problems.
https://our.umbraco.org/documentation/reference/templating/macros/Partial-View-Macros/
Aslo, if you have Umbraco.tv subscription, here are a great tutorial: http://umbraco.tv/videos/implementor/working-with-umbraco-data/macros/setting-up-macro-parameters/documentation/ (Its for Umbraco 6, but it works the same way in Umbraco 7+)
is working on a reply...
Write your reply to:
Upload image
Image will be uploaded when post is submitted
Macro
Hi all,
how to add parameter in macro?
thanks
Hi Alex,
if you need to add a parameter for your macro you should add it in the "developer" section under the "Macro" folder. select the macro you want tom add the parameter and select parameter from parameter tab.
hope this help
Regards,
Samira
Hi Alex. As Samira mentioned, and when you want to read your macro in a Marco Partial View, use:
Where "alias" is the alias defined for your macro parameter.
Best of luck to you, let us know if there is any problems.
https://our.umbraco.org/documentation/reference/templating/macros/Partial-View-Macros/
Aslo, if you have Umbraco.tv subscription, here are a great tutorial: http://umbraco.tv/videos/implementor/working-with-umbraco-data/macros/setting-up-macro-parameters/documentation/ (Its for Umbraco 6, but it works the same way in Umbraco 7+)
is working on a reply...