I'm fairly new in Umbraco and C#. Now I have added a Macro Container into my CMS Page and selected the needed partial macro that I will be using for my page. As shown below
In the image above I have StockistStoreLocatorPartial and MailChimpSignup. Now I want to retrieve this names in my controller so that I can display it in my view. So in my controller I tried this
var macro = node.GetPropertyValue("macro");
but when I debug the value I got this
Somehow it's displaying it into a string. I was thinking of displaying it as list. But I don't know how to do that. I'm thinking if I can retrieve it as an Array list of names I can do something like this in my view
@foreach(var macroName in macroNames)
{
@Umbraco.RenderMacro(macroName)
}
Would really appreciate your help on this. I'm using Umbraco 7.4.1
Macro Container value as list
I'm fairly new in Umbraco and C#. Now I have added a Macro Container into my CMS Page and selected the needed partial macro that I will be using for my page. As shown below
In the image above I have StockistStoreLocatorPartial and MailChimpSignup. Now I want to retrieve this names in my controller so that I can display it in my view. So in my controller I tried this
but when I debug the value I got this
Somehow it's displaying it into a string. I was thinking of displaying it as list. But I don't know how to do that. I'm thinking if I can retrieve it as an Array list of names I can do something like this in my view
Would really appreciate your help on this. I'm using Umbraco 7.4.1
is working on a reply...