Drupal/C2/Creating-Basic-Content/English

From Script | Spoken-Tutorial
Jump to: navigation, search

Title of Script: Creating Basic Content

Author: Gautam Narayanan

Keywords: video tutorial, content type, node, creating article, article content type, Text format,

Teaser mode, Basic HTML, Full HTML, Restricted HTML, WYSIWYG editor


Visual Cue
Narration
Slide 1:

Creating Basic Content

Welcome to the Spoken tutorial on Creating Basic Content.
Slide 2:

Learning Objectives


In this tutorial, we will learn about
  • Content types
  • Creating an article and
  • Creating a basic page
Slide 3:

System requirement


To record this tutorial, I am using
  • Ubuntu Linux Operating System
  • Drupal 8 and
  • Firefox Web browser

You can use any web browser as per your choice.

Slide 4:

Content type


First let us learn about Content type.
  • In Drupal, Content type is the core of the content management system.
  • It is like the backbone of a site.
  • It is one of the things that sets Drupal apart from the other CMS.
  • Most of the CMS just have a title and a body, and that as it turns out, is completely inadequate.
  • In Drupal every content item is called a node.
  • Each node belongs to a single Content type.
Slide 5:

Importance of Content type


Next let us understand the importance of Content type.
  • Content type defines various default settings for nodes of that type, such as
  • whether the node is published automatically
  • whether the comments are permitted and
  • how content gets added to our site
  • Every Content type has fields
  • We have fields for informations that we need, depending on what kind of content is going in.
Let me illustrate it this way.
Show the movie Red page in IMDb.Com site This is IMDb.Com which could be a Drupal site.


This is about the movie Red.

Show the movie Red page in IMDb.Com site


Highlight everything one by one

On the screen, you will see -
  • a poster,
  • a title,
  • a release date,
  • a parental rating,
  • a runtime,
  • a movie genre,
  • a body or
  • a description for the movie.

We will have a set of People fields, as well as some other links and buttons and things.

In other CMSes we could use something like Dreamweaver to create this layout in CSS.
Slide 6:

Example


What happens if we want
  • a landing page for all the movies in 2010
  • that stars Bruce Willis
  • with the parental rating of PG 13.
If you are using another CMS, it is difficult to do this.


But in Drupal, it is done very easily.

This is the real advantage of Content types.
Now, let us go and explore some built-in Content types.


Later, we will also learn about creating new Content types.

Part 1
Time Narration
0:03 Open our Drupal site which we created earlier.


First, we will learn about Article Content type.

0:11 Click on Content and then on Add content.
0:18 Remember we have already created one article.
0:20 We will now create another article with all the elements.
0:24 Click on Article.
0:27 In an article, there’s only one mandatory field, i.e. the Title.
0:32 If we don’t put text in the body, we will have nothing.
0:36 An Article Content type comes with the Summary.
0:38 If we don't put anything in the Summary, Drupal will take the first few characters to create it.


This is called the Teaser mode.

0:45 Let’s proceed.
0:47 We will type a few lines of text here.
1:00 You can type any text that you want.
1:04 This is my text.
1:14 Here Text format shows what elements we are allowed to put into the HTML.
1:22 We have Basic, Restricted and Full HTML.
1:24 Because we are the super user, we can see everything.
1:28 Normally, when a user logs in as an editor or publisher, there is only one Text format here.


They are allowed to use only that Text format.

1:35 For more details, click on About text formats link.
1:39 For now, let's select Basic HTML.
1:44 Basic HTML allows us to
  • look at the source code
  • and use some basic HTML elements like
    • a paragraph tag,
    • strong italic,
    • unordered list,
    • ordered list
    • and a few others.
1:54 Full HTML allows us to embed any HTML including JavaScript and iframes.
2:01 In Restricted HTML, we will just be allowed to enter something like a paragraph tag or line breaks.
2:12 The WYSIWYG editor is CKEditor.


We will learn about it later.

2:16 Here we can see
  • bold, italics, linking, unordered
  • and ordered lists, block quote
  • and image.


A formatting drop down to choose different H tags and then View Source.

2:30 When I change the Text format, I get more buttons.


We will learn about them later.

2:38 Let's leave it at Basic HTML for now.
2:41 Click on Continue button.
2:44 Let's finish our article.
2:47 Once again, let's use the tags - introduction and drupal.
2:54 We will leave the Image blank for now.


You have already seen how that works.

2:58 Here on the right, we get the visibility and publication settings.
3:03 Click on Create new revision checkbox to enable version control for this particular article.
3:09 If we want to add an article to a menu link, click on Provide a menu link checkbox.


Drupal will add a menu item to the main navigation.

3:18 If you do that, we will get hundreds of mails.


So, let’s remove the checkmark.

3:23 We can turn Comments on or off on a particular node.
3:28 Here we can give the URL alias.
3:31 If kept blank, then Drupal will create this for us.
3:37 Under AUTHORING INFORMATION, we can see who created this node and when they created it.
3:43 Under PROMOTION OPTIONS, we can set the View settings like-
  • whether this node will be promoted to the front page and
  • whether it will be sticky at the top of list.
3:54 These are set up when we create our Content type and the editor doesn't need to change those.
4:01 But we can make changes as per our preferences.
4:05 Finally, click Save and publish to save our node.
4:14 Immediately, the node is live on our site.


We can see it here.

4:20 Click on Home page.
4:23 We have our Welcome to Drupalville and Drupalville's Second Article.
4:27 In Teaser mode, these are displayed in publication date order.
4:31 The Read more and Add new comment links are here.
4:37 To get a list of all the nodes tagged with the word Drupal, click on drupal link.
4:42 Again, the nodes are displayed in publication date order.
4:45 That's the Article Content type.
4:51 Let us click on Edit link.
4:53 We can insert anything we want here.
5:02 Drupal gives a lot of options, by default.
5:21 Let us click on Save and keep published.
Part 2
Time Narration
00:05 We can use Content types for anything.
00:07 Let's add another item.
00:10 Click on Shortcuts and Add content.
00:14 Choose Basic page.
00:16 Basic page contains the Title and the Body.
00:19 There are no tags or images.
00:22 It is not promoted to the front page, by default.
00:28 Also, there is no provision for commenting.
00:31 Because it’s not promoted to the Home page, it's easy to create a new menu.
00:37 Type About Drupalville.
00:42 Type some text of your choice here.
00:52 Now, check the Provide a menu link under MENU SETTINGS.
00:54 You will see that the Title changes to a Menu Title.
00:59 We could shorten this, if we want.
1:02 Check it in the main navigation and keep the Weight at 0, for now.
1:06 Weight is where the menu will appear in the list.
1:10 A lower number or negative number, will make it appear higher i.e. it will flow to the top.
1:15 Leave everything else the same.
1:17 Make sure menu link is checked and click Save and publish.
1:23 We get an About Drupalville link.
1:27 It will take us to our Basic page Content type with a node title About Drupalville.
1:34 The node ID shows 3.
1:38 If you have added other nodes earlier, then your node ID might be different from mine.
1:42 At the bottom left, we can see this is node ID 3.
1:47 You won’t need that very often, however.
1:52 That is the article and the Basic page Content type with a menu link.
With this we come to the end of this tutorial.
Slide 7:

Summary


Let us summarize.


In this tutorial we have learnt about

  • Content types
  • Creating an article and
  • Creating a basic page
Slide 8:

Acknowledgement


This video is
  • adapted from Acquia and OSTraining
  • and revised by Spoken Tutorial Project, IIT Bombay.
Slide 9:

Acknowledgement


The video at this link summarises the Spoken Tutorial project.


Please download and watch it.

Slide 10:

Spoken Tutorial Workshops


The Spoken Tutorial Project Team conducts workshops and gives certificates.


For more details, please write to us.

Slide 11:

Acknowledgement


Spoken Tutorial Project is funded by
  • NMEICT, Ministry of Human Resource Development and
  • NVLI, Ministry of Culture

Government of India.

This is Gautam Narayanan signing off.


Thanks for joining.

Contributors and Content Editors

Nancyvarkey, Priyacst