Reference library

Configuring post types

To modify an existing post type click Posts on the Modules area of the Configure tab. The post type table now displays showing all your existing post types. Post types are used to define both posts and forums.

Select the desired post type and click the Edit action. This opens a new pop-up screen in which you can modify the details of your post type. The fields are described below:

  1. Name (Singular) - this is the title of your post type for example 'location'.
  2. Name (Plural) - this is the plural of the post type which is used in output if there are multiple instances of posts for example 'locations'. It's also used as the label in the editor tab.
  3. Post Kind - this provides an option to decide between the type of data you are expecting to create posts about. The options are: 
    • time based for use in calendars and events listings.
    • list based for example posts that are more related to objects, people and places, like directory systems.
    • news based  - similar to time based but displays dates in the past.
    • forums - a special type of post type used for discussion. Post types configured as forum will subsequently disappear from the post type list and instead be listed under the forums option and are managed differently.
  4. Moderated - This only appears if forums is selected , it means that any new discussions or posts to existing forums are not shown until approved.
  5. Groups - Add the current post type to a group if wanted. A new post type is in the default to begin with. A post type can be added to multiple groups. Groups allow you to easily sort and group your posts in the left hand content tab. Groups are created here.
  6. RSS address/iCal Address - 10.1 if diary based the relevant calendar URL is displayed.
  7. Asset Class - this is a drop down list of all the asset classes currently in use on the site. Asset classes govern who has access to each part of the site. Choose one of the available asset classes. Leave it at default if you don't want to select a specific class. If the asset class is changed on the post type the new class can be applied recursively to the existing posts of that post type (added in 11.0)
  8. Edit menu position - This sets the order that the post type will appear in the content tab and on the post type editing list, the number is repeated on the post type list table. Lower numbers are at the top.
  9. Show on content tab - This checkbox allow you to make the relevant posttype visible or otherwise on the content tab. Added in 11.0
  10. Folder for uploads - for use with forms into posts feature. This sets the folder that any attachment will be uploaded into if the user has rights. Added in 11.0

The rest of the fields for the post type are fully configurable, you can add as many as you want and of any type. You can even have another post type as one of your new fields. The following section describes how to add a new field type.

Click on the add another field button at the bottom of the pop-up, then fill in the following fields:

  1. Field Name - this is the name for the field displayed to site administrators.
  2. Label / Description - this is the label for the field displayed to site users.
  3. Field Type - this is the types of fields you can have, there are multiple types:
    • Text - will accept letters and numbers.
    • Number - will accept numbers.
    • Image - (11.2) insert images using the same image picker editorial pages use.
    • Lat/long - Introduced in 10.1 This is a location field and produces a geolocation picker when a post of this type is created/edited.
    • Date field - Introduced in 10.2 this is a date field and produces a date picker when a post of this type is created/edited.
    • Divider - Introduced in 11.2 this field only displays in the CMS admin, allowing fields to be grouped.
    • Checkbox field  - Introduced in 10.2 for boolean yes/no data collection or display.
    • Richtext field - Introduced in 10.2 to allow a further field of rich text to be added to a post.
    • User group - will accept a pre-created user group. You can use this to associate a particular user group or groups with your post. This then means that output posts and lists can be filtered by their associated groups to provide personalised content.
    • User - 10.1 as above but provides a drop down list of available users to associate with your post. The list is drawn from the sites 'members'.
    • Tag - 10.4 a field that can be used to add a comma-separated list of tags/keywords/categories. In admin, this then provides an auto-suggest dropdown for previously existing tags on that posttype.
    • Member Of - 10.1 There is a custom field type for each user group on the site, prefixed by 'Member of'. This produces a dropdown list to choose Sitekit users/members who belong to that group.
    • Existing post type - this is where the power of posts comes in. You can select any previously configured post type as a field type for your new post type. This allows you to relate your posts together and make cross references.
  4. Mandatory - tick this box if you want to make it compulsory for users adding posts to fill in this field.
  5. Multi-Select - tick this box if you want to allow the user to make more than one selection from the options offered by this field type. Only relevant if the field type is an existing post type. The post edit field presented when multi select is chosen allows you to look for options and to add them in bulk or one by one
 
When used as forums you can also control the communication between users posting on discussion threads. Whenever someone posts on a forum , a notification email is sent to everyone else who has commented on that discussion, together with the person who started that discussion (10.2). This is handled in the Email Message for New Posts section which has the following fields.
  1. email from - The text that indicates who the email was sent from. Set using specific magic words such as :::discussion.owner.fullname:::
  2. email subject - The subject of the email sent to other contributors when someone posts on the forum  eg :::site.name::: :::discussion.name:::
  3. email body - The email body normally sends the discussion title and comment body to give the context eg :::comment.owner.fullname::: added the following comment to :::discussion.name:::  :::comment.body:::
 
Then finally click on insert to create the new field type for this post type.
 
Click Publish to store your newly modified post type.

Related questions