I am wanting to create a couple of catalog nodes and restrict the product/variation types which users can create under them.
For instance, you might have a Clothes Catalog and a Shoe Catalog. And then a ClothingProduct and a ShoeProduct. I only want to be able to create ShoeProduct under the Shoe Catalog etc.
I've had a look at documentation and couldn't see anything like this. I have tried to roll my own custom catalog inhertining Catalog and then using AvailableContentTypes to restrict types but this didn't work, maybe I need a UI Descriptor for it to show in the CMS, I am unsure.
Any help would be great.
You can't extend or inherit CatalogContent. A workaround is to have an immediate Node, like Shoes, under Shoe Catalog, which is an extended NodeContent class with proper AvailableContentTypes attribute.
Does this mean you create your catalog root (Type:Catalog) and then extend the Category node with proper AvailableContentTypes. Or are you talking about a completely new type of node in addition to Category, Packages etc
It is like this
Shoe Catalog => Shoes => Brands => .... (shoes)
You can have ShoesNodeContent extends NodeContent and add AvailableContentTypes to it. Then create Shoes from ShoesNodeContent
Something as simple as? -
GUID = "FFE372D9-EBEA-48C9-B723-3293E1B2A53C",
DisplayName = "Shoe Node",
Description = "Shoe Node")]
public class ShoeNodeContent : NodeContent
This causes "Multiple custom attributes of the same type found"
What are you talking about? This is from our QuickSilver:
GUID = "a23da2a1-7843-4828-9322-c63e28059f6a",
MetaClassName = "FashionNode",
DisplayName = "Fashion Node",
Description = "Display fashion products.")]
[AvailableContentTypes(Include = new
public class FashionNode : NodeContent