The Blog Post Content Type

The values of the Explanation or submission guidelines are somewhat arbitrary; while this section can be used to give instructions, it can also be used to have fun. Obviously, the rules of civil and appropriate discourse apply, but you can use these instructions to add a touch of unexpected flavor.

Assign Taxonomy

Click the Administer | Content management | Taxonomy, or admin/content/taxonomy.

As shown in the following screenshot, click the edit vocabulary link for the Keywords taxonomy we created in Chapter 3.

I Name





edit vocabulary 1

list terms

add terms

Then, add Blog post to the list of Content types as shown in the following screenshot:

Then, add Blog post to the list of Content types as shown in the following screenshot:

o Content types

Content types:

0 Blog post

□ Book page 0 Bookmark

Select content types to categorize using this vocabulary

Click the Save button to save your changes.

Assign Permissions

Click the Administer | User management | Roles link, or navigate admin/user/roles. Click the edit permissions link for the teacher role.

, Every time we create a new content type, we will need to assign user roles C^ permissions to use the content type. The permissions for content types are usually assigned via the node module.

Permission teacher

node module

access content

administer content types

administer nodes

create blog_post content


create book content

create bookmark content


create page content

create story content

delete any book content

delete any bookmark content

delete any page content

delete any story content

delete own blog_post content


delete own book content


delete own bookmark content


delete own page content


delete own story content


delete revisions



edit any book content

edit any bookmark content


edit any page content


edit any story content


edit own blog_post content


edit own book content

edit own bookmark content


edit own page content


edit own story content

revert revisions


view revisions

Assigning a role the Administer nodes permission will allow all users in xl that role to add, edit, or delete all posts of all content types. Administer C^ nodes permissions should only be assigned to highly trusted users. The permissions described in this section need to be assigned individually for all content types.

Content types usually have five permissions. For every individual content type, the following permissions can be assigned:

• Create: This permission allows a user to create nodes of a specific content type

• Delete own: This permission allows users to delete posts they have authored

• Delete all: This permission allows users to delete any post, regardless of who created it.

• Edit own: This permission allows user to edit posts they have authored

• Edit all: This permission allows users to edit any post, regardless of who authored it.

As shown in the preceding screenshot, we want to assign the teacher role permissions to create blog_post content, delete own blog_post content, and edit own blog_post content.

Click the Save permissions button to save the permissions.

Hey! Why Not Use the Blog Module?

Drupal comes with a blog module. Although it could be used for this site, we are opting not to use it because of how we are structuring the blog. Unlike more traditional blogs, we will be configuring this blog to make it easy to include audio, video, and images, as well as text. A person's blog will contain the full range of content they create.

Additionally, Drupal's blog module has some features that work better for single user or multiple user blogs than for this site. These features include some default displays that list all blog posts. For this site, we will be using Views to create displays for our content; this allows for a greater degree of flexibility than the blog module. So, rather than trying to override the default behavior of the blog module, we will sidestep the issue entirely.

Was this article helpful?

0 0

Post a comment