Question

I am working on a simple project for umbraco and I am in need of a category section. That's why I started to create pages for categories. In websites I am using ultimate picker to select categories. Until this point everything is just fine I can see the categories that I choose in websites page.

Websites
- XXX
- YYY
- ZZZ
- ...
Categories
- Fashion
- Electronics
- ...

My problem is listing all fashion selected websites under the Fashion Category page. I couldn't find any example for this. I would be glad if you could help me in this matter.

Was it helpful?

Solution

Which version of Umbraco are you using? If you're using a version that supports Razor scripts then you could create one and do something like this:

@inherits umbraco.MacroEngines.DynamicNodeContext
@using umbraco;
@using umbraco.MacroEngines;
@{    
  var node = Library.NodeById(identifierOfFashionNode);
  foreach (var child in node.Children) {
    // do something with the children of the fashion category
  }
}

Actual implementation may vary depending on your version, this is suitable precisely for 4.7.2.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top