Søk i hjelpesidene:
Printer friendly version

Create a custom objects

Introduction

You might want to create a new object type in E-Site for several reasons, these are:

  • Create your own E-Site module (new system modules)
  • Create new functions for your website content (new content item types)
  • Create new functional parts for your design (new design parts)
  • Create a "table" to store data in

Step 1 - Open the new object type dialog

This can be done from the developer button as shown on the image below:

Step 1 - Open the new object type dialog

Step 2 - Click new object type

Then click the new object type button. You can also use the "Display object types" button to show a list of all object types in the application. You can study other object types and see how they inherit from other types to see what options you have to extend and inherit object types.

Step 2 - Click new object type

Step 3 - The new object type dialog explained

The dialog looks like this:

Step 3 - The new object type dialog explained

You have the following fields:

  • Name - Name of your new object type, don't use symbols. You can and should use space characters to seperate words. (Note for programmers: There is automatically generated a class with this name dynamically or you can write your own class for it. E-Site will generate a stub class for you.)
  • Inherit - Specify what type of object this is (see the object type list). Objects are classified in a structure of inheritance just like in programming. Here is a list of typical types you want to inherit from in some scenarios:
    • System - You want to create a new E-Site module that you want to add to the menu structure in the admin pages for users.
    • Content item - You want to create a new type of item to add to your web site contents.
    • Design part - You want to create a new type of function or element to add to your designs.
    • User - You want to create a new type of user object in E-Site.
    • Member - You want to create your own custom member object schema, with your custom defined member profile fields.
    • Root object - You want to create a custom table. (You want to create objects that are not placed into the E-Site object structure.) Use the "Object type list" system module to list your table in the E-Site admin pages.
  • Owner class - This is used in special cases, it is for you to easily choose what kind of objects this new object type can published to. One example would be that the Discussion object type has the owner class Discussion forum, this is because the discussion forum can contain discussion objects.
  • Copy Object Type - Fill out this field to copy the fields from another object type to your new type.

Step 4 - Studying the object type list

Use the object type list to study other object definitions. In this way you can see how other functions in E-Site have been created and what inherit options you have.

Step 4 - Studying the object type list

Post your questions to the forum!