public List<Compares> CompareValues(string ids)
{
var result = new List<Compares>();
if (!string.IsNullOrEmpty(ids))
{
string[] listOdIds = ids.Split(new char[] { ',' });
foreach (var id in listOdIds)
{
var page = Umbraco.TypedContent(id);
var imageUrl = Umbraco.TypedMedia(page.GetPropertyValue<string>("image")).Url;
var comparess = new Compares()
{
Id = Convert.ToInt32(id),
Title = page.GetPropertyValue<string>("title"),
Url = imageUrl
};
result.Add(comparess);
}
return result;
}
return result;
}
How to get the multiple IDs in Examine
Hi guys,
How can I get this three (3) ideas, and get their properties.
Appreciate any help,
Thanks in advance,
Marky
Hi Marky,
Are those ID's for ContentNodes OR MediaNodes?
If they are for Content then you can use the following to get back the Node properties for:
Then you could pull properties off from this object in code like below:
If they are for Media then use the following:
Then access properties of the Media node like so:
etc.
The following document will be really helpful for you: UmbracoHelper
Thanks
Craig
Hi Craig,
Thanks for your help, I actually got it :) https://our.umbraco.com/forum/extending-umbraco-and-using-the-api/95629-how-to-get-3-values-using-keyvaluepair
Cheers,
Marky
is working on a reply...