Now you will learn how to create a news item. Click Edit in the main toolbar. Click News in the content tree and click New. Choose to create a new document of type News. You are redirected to the form that allows you to define news item sections: title, summary, full text and release date. Enter the following text:
• | News title: My first news |
• | News summary: Some summary text. |
• | News text: Some news text. |
Click Save to save the new document.
As you can see, the editing mode is now set to Form instead of Page. It means you do not edit the editable regions on the page, but you edit the structured data related to the document. The Form tab is used for editing the structured data related to the document. The document fields are fully customizable for every document type.
When you click Live site, you will see the news item displayed using a pre-defined transformation in both News and News -> My first news page:
You have learned how to add a news item and how to use the editing form for structured documents.
|
Page versus Form
There are two faces of document: content stored in editable regions on the page and data stored in form fields. The following table compares both approaches:
|
Editable regions
on the page
|
Form
|
Content structure
|
Simple content structure, only text content.
|
Complex content structure, typed data, such as text, date-time, numbers, etc.
|
Validation
|
Only basic validation rules for minimum and maximum length.
|
Complex validation rules, including regular expressions and custom form controls with custom validation code.
|
Display
|
The content is displayed in the context of the page as it is displayed in the editing mode.
|
The content is displayed using XSLT or ASCX transformations using special controls or web parts.
|
Storage
|
The content is stored in a single XML document in the document properties.
|
The content is stored in a separate database table. Each field has its own column. The data can be easily modified using SQL queries or API.
|
Examples of use.
|
Home page, contact page.
Generally: pages with simply structured or unstructured text-based content.
The editable regions are usually used for documents of type Page (menu item).
|
News, product specification, event details, job opening, etc.
Generally: pages with structured content where you need to separate content from design and keep the content in its original data type.
The form-based content is usually used for documents of type News, Product, Article, etc.
|
|
|