3

I create a new content model, and i made its inheritance to be associated with cm:content to save the nodes as content under specific folder.

But, What if i want to associate the content model with sys:base as example ? Where the nodes will be saved ? How to create a container for the nodes ?

Person and other content does not inherit from cm:content, and i don't want the user to manage the nodes from something else where, i want to ensure that the user will manage the nodes created from the new content model from created dialogs and pages designed to serve something like this.

all of your replies is highly appreciated

Mohammed Amr Senior System Developer Digital Series Co.

vegemite4me
  • 6,621
  • 5
  • 53
  • 79
Mohammed Amr
  • 307
  • 5
  • 15

1 Answers1

6

sys:base is defined in systemModel.xml as follows (last HEAD revision showed here):

  <type name="sys:base">
     <title>Base</title>
     <mandatory-aspects>
        <aspect>sys:referenceable</aspect>
        <aspect>sys:localized</aspect>
     </mandatory-aspects>
  </type>

Go through the systemModel to learn about the two aspects that are mandatory for such type. cm:content inherits indirectly from sys:base, as you can see in the contentModel.xml, passing through cm:object that puts some constraints and indexing fairy powder onto it.

In the contentModel, you can also see that cm:folder exposes a new association named cm:contains that target sys:base objects. This means that within a cm:folder (and subtypes) you can store every type in the hierarchy branch started by sys:base, including cm:object and cm:content.

This should be already enough to show you how:

  • to create containers that allow for specific child types
  • there's no big difference between cm:content and sys:base when it comes to storing such types in a cm:folder
  • types are in a inheritance hierarchy, and as such you choose which type to inherit from depending on its properties and relationships with other entities in the repository
  • if you want, you could inherit from sys:base instead of cm:content or cm:object, but then you'll miss all of the features introduced by those more high level types

I can't see why content types should change or affect the way users access content, especially if you have your own pages to show content to users.

As a side note, also usr:user inherits from sys:base, as you can see in the userModel.xml

skuro
  • 13,414
  • 1
  • 48
  • 67
  • if the content inherited from the cm:content the nodes created will be seen in the folder and the user have an access can delete them or make a change on their properties. So i need to make them inherited from sys:base to be unseen and enforce the user to walk through the designed pages from maintain process. What are you think ? – Mohammed Amr Aug 01 '11 at 10:56
  • I think you're getting security wrong here: don't rely on content types to enforce security contrains such as make content not visible or not accessible, as you might have some different UI behave differntly. I would rather set permissions on content so that normal users can't do anything (e.g. `Consumer` role, or `No Privileges`), and have some logic that runs with more privileges allowing managing content. – skuro Aug 01 '11 at 11:11