Kentico CMS 7.0 Tutorial  

Creating a news item

Creating a news item

Previous topic Next topic Mail us feedback on this topic!  

Creating a news item

Previous topic Next topic JavaScript is required for the print function Mail us feedback on this topic!  

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

Release date: click Now

News summary: Some summary text.

News text: Some news text.

 

Click Save Save to save the new document.

 

tutorial_clip0032

 

As you can see, the editing mode is now set to Form instead of Page. It means you do not edit editable regions on the page, but rather 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 on both the News and News -> My first news page:

 

tutorial_clip0034

 

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 aspects of a 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 openings, etc.

 

Generally: pages with structured content where you need to separate content from design and keep the content in its original data type.

 

Form-based content is usually used for documents of type News, Product, Article, etc.