Basic Content Types
A content type (or "node type") is simply a data submission form. Content types are used to categorize groups of content that have similar elements, or are expected to perform in a particular fashion on a dynamic website.
Drupal comes with two standard content types, different modules that are added to Drupal may provide their own content types, and a permitted user can also create custom ones as well. The content types that you will find in OSU Drupal 6 are as follows:
- Book page
The two basic content types that are part of Drupal's core distribution are the Page content type and the Story content type.
In the OSU Drupal 6 distribution, there isn't much of a difference between Page and Story in terms of format. Both are very generic forms that have similar fields and both provide the same default options found on all node types in Drupal. The only difference between the two is that Page is set to automatically publish when you click the Save button and Story is set to automatically save as a draft when you save.
The Page content type is suggested for static content - this is content that doesn't change very often. Story is suggested for more dynamic and engaging content such as a news story, press release, or human interest story. The reason for two similar, yet differently named content types, is to provide the user with variation in node types - this probably doesn't mean too much to you yet, but when you move into more advanced subjects such as using Views, having varying node types provides a great deal of flexibility for site builders.
For now we'll take a look at Page, and keep in mind that Story is almost exactly like it. If a module has its own content type, instructions for that content type's use will be included in the information about the module.
Common Node Type Elements
The following components will appear on every content type. The order of the components can be changed using CCK, but the components themselves can not be removed.
This field wil display the title of the node. This is a required field, as indicated by the asterik next to the label.
Menu settings fieldset
You can add your content to any menu within your site via the fields in this fieldset.
- Menu link title field
- If you wish to create a menu item, you must give it a title. The title can be the same as the title of the node, or it can be different, if you wish.
- Parent item field
- This is where you "attach" your node to a menu. It's a very long list with some special syntax. Items that are surrounded by arrow characters (< >) are the actual menu names and are sorted alphabetically. Items that display dashes ( - ) are menu items within that particular menu. The more dashes you see, the deeper the item is in the menu structure.
- Weight field
- This is how you order items in a menu. The default ordering is alphanumeric. If you do not want your items sorted alphanumerically, apply a weight. The lower the number, the higher it will rise in the menu order.
This is the the default area to enter your text content and embed media and links.
- Show summary in full view checkbox
- This component is only found with the Body field. It is intended to help with the handling of teaser/summary text but is not really used. You can ignore it.
- Disable rich-text link
- OSU Drupal 6 uses the TinyMCE text editor for rich text editing, but for those who prefer to use HTML, this text editor can be disabled for the node by clicking on this link.
- Once the link is clicked the text on it will change to Enable rich-text. To turn rich-text editing back on, click the link.
Input format fieldset
These options control the type of input that is used in the text editor. This is actually an important security feature, that often confuses new users.
- Filtered HTML option
- This is the default input format setting. It works for all basic text content development. All roles can access this option.
- Full HTML option
- If you will be embedding images or using inline CSS styles (bold, italics, alignments, etc) you will want to use this option, otherwise your images won't position as you want them to and any inline CSS styles you may apply will be stripped out. All roles can access this option.
- PHP option
- Please note that if you use the PHP option, it disables the rich text editor features and the WYSIWYG editor can NOT be turned back on for that node, otherwise it will permanently strip your code.
Book outline fieldset
The components within this fieldset are typically only used with the Book page content type, but this fieldset is included on all node submission forms due to the fact that different node types can be included into a Book structure if desired. More in-depth information regarding this component can be found in the Books section of this book.
Revision information fieldset
The components within the Revision information fieldset are used to track revisions. By default, revision tracking must be selected each time you want to create a revision for the node you're working on, but your site's Administrator can configure this to happen automatically, if desired.
- Create new revision checkbox
- If you would like to save a revision of this particular node, check this box.
- Note that, under normal conditions, if you wanted to repeatedly save revisions on this node, you would have to check this box each time. Your administrator can configure the content type so that revision tracking is automatic.
- Log message field
- This field allows you to leave a brief message regarding the changes that were made in this revision.
URL path settings fieldset
OSU Drupal 6 is set up so that when you create your content, the title of the content is automatically processed and used as the URL path, or web address, for the node. If you wish to change the alias of your content you can do so here.
- Automatic alias checkbox
- By default, this checkbox is checked and the system will automatically create an alias for your node. If, however, you want to manually change the alias, uncheck this box.
- Alias field
- Once the Automatic alias checkbox is unchecked this field will become active and you can put whatever alias you desire in the field. Please note that it's best to stay within the conventions used by the system which are:
- Alpha-numeric, lower-case letters
- Your aliases display in lists for different tools throughout Drupal. Keeping them all lower-case ensures proper sorting.
- Dashes to separate words
- Google recommends this.
- Underscores are often hidden by a hyperlink's underline when rendered on the page.
- Different search engines read and treat underscores differently than dashes. Dashes are universally recognized as a word separator while underscores are not.
- No non-alphanumeric characters, other than a dash.
- This includes punctuation and non-English text. These characters can often result in odd output, or may even break your link.
File attachments fieldset
If you would like to upload and attach a file to your node, similar to how you attach files to an e-mail, you can do so here.
- Attach new file field
- Here you can connect with your computer, upload, and attach a file to your node which your users can then click on and download to their computers.
- This component is configured to allow a maximum 1MB file size upload. This upload limit can be increased to the system max of 8MB by your site administrator.
Authoring information fieldset
This fieldset contains information about the original author and post date of the content.
- Authored by field
- The name of the first person who submits this node will be automatically entered in this field. If a node is to change ownership, a new person's name may be entered in here.
- Authored on field
- A date stamp of the first date this node is submitted will automatically be put here once the node is saved.
Publishing options fieldset
This fieldset contains options related to the publication of your node.
- Published checkbox
- If checked, the world can see your content.
- If unchecked, only users who are logged in to the site will be able to see your content.
- Note that unpublished items will not appear in menus, even if you have a menu setting. To locate unpublished content, go to the Content List at Admin menu > Content management > Content.
- Promoted to front page checkbox
- This feature does not often apply to our OSU Drupal 6 installation unless you are using the Feature Story or Highlights content type and blocks used in the OSU Standard theme.
- Sticky at top of lists checkbox
- This option does not often apply to our OSU Drupal 6 installation. It is intended to keep posts at the top of a list.
This fieldset provides the ability add a CAPTCHA test to your node. It is set up to display on all node types but is typically only used with Webform and/or HTML forms that are submitted by anonymous users. CAPTCHA is covered in greater detail in Add a CAPTCHA Challenge, within the Webform section of this book.
Page Content Type
The Page content type is best suited for static content. Static content is content that does not change very often, such as information on an About Us page.
This is a basic, easy to use content type. All fields on a Page submission form are standard fields that are common among every content type.
To create a new page, go to Admin menu > Create content > Page. Following is a completed, sample submission form.