Alfresco 3 Cookbook
上QQ阅读APP看书,第一时间看更新

Creating content

After creating space for storing your contents, it is now time to create content. Contents in Alfresco can be created in two ways—create the content using Alfresco Explorer editors or upload an existing content from your computer.

In this recipe, we will see how to create content using the Alfresco Explorer.

How to do it...

  1. Click on Create Content from the right links.
  2. The form to populate the name and type of the content appears.
  3. Provide the name of your new content. The Type parameter defines the content and Content Type parameter defines the mime-type of the new content.
  4. By default, only Content is available as the Type. However, you can create your custom types easily. Custom types are useful when you want to create and associate new properties, new behaviors with your content.
  5. And Alfresco offers simple contents to be created by the Explorer interface—plain text, XML, and HTML. Alfresco Explorer comes with a simple WYSIWYG HTML editor (TinyMCE), which helps you to create HTML contents.
  6. The editor will be used depending on the content type you have selected for your new content. In case of text and XML, a simple text area will appear where you can put your content; in case of HTML content, the TinyMCE editor will be rendered, offering you to enter the contents in HTML format.
  7. Click on Next or Finish. The last step is to provide proper property values of your new content—properties such as Name, Encoding, Title, Description, Author, and so on. If you check the Edit Inline option, Alfresco will use its default editor to enable you to edit the contents.
  8. This property sheet will appear only if you have selected the Modify all properties when this wizard closes checkbox in step 2.
  9. After filling up the property values, click OK. Your new content has been created.

There's more...

One important point here is the property sheet having several properties or attributes of the content. These properties are controlled and rendered by the type of the content you are creating.

By default, here you have used the type as Content, as this is the one type available for use in Alfresco Explorer in its default distribution. This is the base type for all contents created in Alfresco; and this type has the properties Name, Title, Description, Encoding, Author, and so on. However, there are more properties not displayed in this form which are used in several functionalities on the content. During the course of this book, we will frequently visit the properties and usage of the same.

See also

You can also create your own custom type and properties. See Chapter 7 for how to create custom types and how to use them.