Creating a new content class
Creating a new content class
The Webnodes data model is defined in the Ontology module. In the module you create content classes, properties and how the different classes are related. Let's start with a simple example where we create a custom Article content class:
- Select the "Ontology" module
- Click the "New class" button
- Type in your desired namespace for the new content class. In this example we use MySite.
- Type in your desired class name for the new content class. Remember that all the classes you define become actual c# classes, so use proper naming conventions for the class name.
- You must inherit one of the built-in content classes. The base object is called just "ContentClass". If you want to be able to add nodes of your new content class to the content tree, it must inherit from "HierarchicalContent" or one of the other content classes that inherit from "HierarchicalContent".
- Click "OK" to create the new class definition.