There should be two ways you can access the property:
var category = SiteContext.Current.CatalogContext.CurrentCategory;
// Access the property by key
var property = category["CategoryAreaaHeading"];
if (property != null)
{
var propertyValue = property.GetValue();
@propertyValue;
}
// Access the property using the method
var property = category.GetProperty("CategoryAreaaHeading");
if (property != null)
{
var propertyValue = property.GetValue();
@propertyValue;
}
BTW was "categoryAreaaHeading" meant to be "categoryAreaHeading"?
Get properties of item.
Hi
Maybe this is a simple question, but how can I pull out data from a custom property I just made on my default category definition.
The name of the new property I have made is categoryAreaaHeading.
I have tried something like this:
Both without any luck.
My code looks like this:
If somebody can help, the help will be much appreciated.
/Dennis
Hi Dennis,
There should be two ways you can access the property:
BTW was "categoryAreaaHeading" meant to be "categoryAreaHeading"?
Let me know how you get on.
Tim
Hi Tim,
Thanks for your help,
It works, like a charm.
/Dennis
is working on a reply...