Create News item content type

Create content type
The content type used in this tutorial can be created by:

  • Importing the cck-export file available in the Export_files_V1.6.zip file.
  • Creating the content type manually
  • Both options are described here.

    Path to Content types page:

    1. Navigate to Administer > Content management > Content types in the admin menu.

    Information

    This page will explain how to create the News item content type for a Dynamic display block slideshow. The News Item content type will have the following fields:

    • Title - Title of a slide and title of full node view (standard with a content type)
    • Pager item text - Text of a pager_item (new text field)
    • Slide text - Text on a slide (new text field)
    • Image - Slide image and pager image (new imagefield)
    • Body - Text of full node view (standard with a content type)

    Import News item content type

    You can download News item content type export from the Export_files_V1.6.zip package at Download page.

    Important: You need to have CCK, imageapi, filefield and imagefield installed and enabled on your Drupal installation, otherwise the import will not be successful.

    Permission:

    Configure the following user permissions at Administer > User management > Permissions: (optional if CCK Content Permission module enabled)

    1. content_permissions module:
      • view field_image
      • view field_pager_item_text
      • view filed_slide_text

    Detailed instruction on how to add a News item content type manually:

    1. Click the Add content type tab.
    2. Fill in the following form fields.
      • Name - News item
      • Type - ddblock_news_item
      • Description - News item used for a Dynamic display block slideshow.
    3. Click the Save content type button.

    Adding a content type News item

    To add new fields to the content type:

    1. Navigate to Administer > Content types > News item in the admin menu.
    2. Click manage fields link.
    3. Editing a content type News item

    4. Add a new field pager_item_text.
    5. Fill in the following form fields.
      • Label - Pager item text
      • Field name - pager_item_text
      • Field type - Text field
      • Widget type - Text field
    6. Add slide_text field.
    7. Fill in the following form fields.
      • Label - Slide text
      • Field name - slide_text
      • Field type - Text field
      • Widget type - Text area(multiple rows)
    8. Add field image.
    9. Fill in the following form fields.
      • Label - Image
      • Field name - image
      • Field type - File
      • Widget type - Image
    10. Click the Save button.

    The screen shot below shows how to add new fields. Add the Pager item text, Slide text, and Image fields one at a time.

    Adding fields

    To configure the new field Pager item text:

    1. Navigate to Administer > Content management > Content types > News item in the admin menu.
    2. Click the Configure link under Operation of the Pager item text field.
    3. Fill in the following form fields.
      1. News item settings:
        • Size of the text field - required to set (Set e.g to 60 - default value).
        • Help text: Pager item text - Used for the text of a pager_item.
      2. Global settings:
        • Required checkbox - check to be required
        • Number of values - 1
        • Text processing - Plain text
        • Maximum length - optional (Set e.g. to 30 so you don't go over the width of the pager item).
    4. Click Save field settings button.


    To configure the field Slide text:

    1. Navigate to Administer > Content management > Content types > News item in the admin menu.
    2. Click the Configure link under Operation of the Pager item text field.
    3. Fill in the following form fields.
      1. News item settings:
        • Rows - required to set for the number of rows of the slide text (Set e.g to 5 - default value).
        • Help text: Slide text - Used for the text on a slide.
      2. Global settings:
        • Required checkbox - check to be required
        • Number of values - 1
        • Text processing - Plain text
        • Maximum length - optional
    4. Click Save field settings button.

    To configure the field Image:

    1. Navigate to Administer > Content management > Content types > News item in the admin menu.
    2. Click the Configure link under Operation of the Image field.
    3. Fill in the following form fields.
      1. News item settings:
        • Help text: Image - Image to be used for the Slide image and Pager image.
        • Permitted upload file extensions: required and just leave the default file extension
        • Minimum resolution for Images: (optional)
        • Maximum resolution for Images: (optional)
      2. Global settings:
        • Required checkbox : check to be required
        • Number of values: 1
        • List field: Check radio button Enabled
        • Files listed by default: Unchecked
        • Description field: Enabled
    4. Click Save field settings button.

    To arrange fields

    1. Drag and drop the following fields to it's order:
      1. Title
      2. Pager item text
      3. Slide text
      4. Image
      5. Body
    2. Click Save button.

    To configure the Display fields:

    Display fields can be configured how this content type's fields and field labels should be displayed when it's viewed in teaser and full-page mode.

    Note:

    If you use fields like the pager-item-text only for the pager and don't want to show these fields in the full node view when the user clicks the readmore button, you can set this fields to hidden:

    Path to Display fields page:

    1. Navigate to Administer > Content management > Content types > News item in the admin menu.
    2. Click Display fields tab at the top of the page.
    3. Fill in the following form fields.
      1. Pager item text:
        • Label: Above
        • Teaser: Default
        • Full node: Hidden
      2. Slide text:
        • Label: Above
        • Teaser: Default
        • Full node: Hidden
      3. Image:
        • Label: Above
        • Teaser: Image
        • Full node: Image link to node
    4. Click Save button