List (ContentType)

From Sense/Net 6.0 Wiki

Jump to: navigation, search

Lists are tables of information, similar to Excel spreadsheets. The big difference is that you can easily share lists with others. You can define fields (columns) of your custom lists. Many features of Sense/Net 6.0 relies on lists. For example the form portlet stores the submissions in a used defined form list.

You can read more information about the concept of lists on Contents & Lists wiki page.

Tips & Tricks:
Important note: You can not use "." character in the ContentType name.

Follow this link to get familiar with the a Schema of ListerDefinition.

<ContentType name="Lister" parentType="Folder" handler="SenseNet.ContentRepository.Lister" xmlns="http://schemas.sensenet.hu/SenseNet/ContentRepository/ContentTypeDefinition">
  <Title>List</Title>
  <Description>Contains any ListerItems</Description>
  <Fields>
    <Field name="ContentTypes" type="Reference">
      <Title>Enabled ContentTypes</Title>
      <Description>Enabled ContentTypes</Description>
      <Configuration>
        <AllowMultiple>true</AllowMultiple>
        <AllowedTypes>
          <Type>ContentType</Type>
        </AllowedTypes>
        <SelectionRoot>
          <Path>/Root/System/Schema/ContentTypes</Path>
        </SelectionRoot>
      </Configuration>
    </Field>
    <Field name="ListerDefinition" type="LongText">
      <Title>ListerDefinition</Title>
      <Description>Lister fields definition</Description>
    </Field>
  </Fields>
</ContentType>

On this picture you can see how all these will look like in Content Explorer.

Image:Lister_contenttype.jpg


Example for ListerDefinition from Form portlet :

<?xml version="1.0" encoding="utf-8" ?>
<ListerType xmlns='http://schemas.sensenet.hu/SenseNet/ContentRepository/ListerTypeDefinition'>
  <Title>Newform</Title>
  <Description>NewForm</Description>
  <Icon>Newform</Icon>
  <Fields>
	<ListerField name="#Title" type="ShortText">
	  <Title>Title</Title>
	  <Description>Title</Description>
	</ListerField>
  </Fields>
</ListerType>
Personal tools