arrow-left

All pages
gitbookPowered by GitBook
1 of 2

Loading...

Loading...

Exercise 2.8: Testing content types

hashtag
Content test - manual

Create a Job listing manually.

  1. Go to Content -> Add content → Job posting.

  2. On the Add Job posting form, enter the following information:

    • Job Title – Police Officers

    • Terms of employment – Permanent

  3. Leave all remaining default settings.

  4. Click Save.

You should now see your newly created Job Posting.

hashtag
Content test – generated content

Often we need content to help test new content types. However, creating content manually can be very time consuming. Instead, we can use the Devel Generate – a module, bundled in GovCMS.

Note: The Devel Generate module should not be enabled or used in a production website.

This module is already enabled on your training environment.

  1. Go to Configuration → Generate → Generate content.

  2. Select the Job Posting checkbox.

  3. Enter 10 in the How many nodes would you like to generate? field.

circle-info

Note: Content generated by the Devel Generate module is not published by default – this is due to active content moderation workflow. Make sure you publish content if necessary.

Manage form display

GovCMS allows you to configure all aspects of the content creation forms. It gives you control over the position of form fields, widget configuration and additional options such as field size, image thumbnail preview size and much more.

Your instructor will give you an introduction to managing form display.

hashtag
Manage display

Geographical Region: Victoria
  • Job Description – Victoria Police is looking for more than 3000 people across the state in their biggest recruitment drive ever. If you’re interested in keeping Victorian communities safe and want a challenging and rewarding career, then join the force.

  • Click Generate button.

    Image of Job posting
    Image of Job posting
    hashtag
    Display modes

    Display modes (found at /admin/structure/display-modes) exist to provide different presentations of Content Entities for either viewing or editing. The two types of display modes are View modes and Form modes.

    To see the availale Display modes for the Blog article content type, go to Structure → Content types → Blog article → Manage display, then click on Custom display settings.

    hashtag
    Form modes and (form) operations

    Form modes are a way to create different field configurations with the same content entity bundle. Form modes allow for multiple sets of field widget orderings and customisations, just as view modes allow for different orderings and customisations of field formatters.

    This gives us more flexibility over how things will appear when someone is looking at the add/edit form for any content types.

    hashtag
    View modes

    Your instructor will now show you how view modes are used to control how content appears in different conditions on a sample website. Later in this course you’ll learn how to add view modes in GovCMS.

    hashtag
    Consider using view modes

    In most cases websites need to apply CSS in the theme to be able to get total control of the layout. View modes allows the same content to be displayed in a variety of layouts.

    hashtag
    Manage Display interface

    Go to Structure → Content types → Job Posting then click the Manage Display tab at the top of the page.

    This admin page allows you to change the field display settings. For example, you can change the display order of the fields.

    For the moment, don't make any changes - we’ll look at this page more later.

    Image of display modes
    Image of display modes
    Image of display modes
    Image of display modes
    Image of display modes
    Image of Events displays
    Image of job listing
    Image of job listing detail
    Image of display modes
    Image of Create Job posting