官术网_书友最值得收藏!

Creating content

Now is the time to create our very first post!

To do so, we need to do the following:

  • Click on content, after which we are greeted with our content listing page, which allows us to see all our content on the website ordered by when it was last updated. For now, however, this is showing no entries as we have nothing saved yet.
  • To add content, click on + Add content.

We are now taken to another page that shows us the existing content types we can create:

Fig 1.12: The content creation page

If we click on Post, we are taken to another page that shows the fields we added earlier:

Fig 1.13: The Create Post page

In Fig 1.13, we can see the fields we added, these being Post content and Post category.

To create our content, we need to fill in the fields, so let's do this now:

  • Post title: Our very first news article 
  • Post content: We have some exciting news to announce, we've created some content!;  as you can see from this field, we have an editor that allows us to do a variety of things.
  • Post category: Up and coming; if we remember, when we type a taxonomy term that already exists, an autocomplete will run and show a term that is similar to or matches the one we are entering. However, if this term doesn't exist, then it will create it for us!

Other parts of the content creation page are the columns to the right, which are for editorial purposes:

  • Revision: This allows us to view previously saved content
  • URL path settings: We can add our own path, but there is a module called pathauto that we can use (https://drupal.org/project/pathauto)
  • Authoring information: This will add our username and a timestamp by default; however, we can modify this to show another author and another timestamp
  • Promotion options: This gives us basic control of how our content is listed; we have two options here:
    • Promoted to front page
    • Sticky at top of lists

Now that we understand how the content creation page works, we can save our content. We can see that there's a Save and publish button and to the right-hand side of this button, there is a drop-down arrow; if we click on the arrow, we are shown another option--Save as unpublished.

However, we want our first post to be published, so let's do that now:

Fig 1.14

There, you've created your first news article; you'll see node/1 in the URL after our site URL. This is the default Drupal core naming convention for our content.

Wait, this page looks ugly! We want to change it; we have labels above our content and various other displays. By default, we have view modes of Default and Content.

主站蜘蛛池模板: 会理县| 岐山县| 彰武县| 兴义市| 邛崃市| 黄冈市| 肥西县| 肥西县| 中西区| 三亚市| 临猗县| 安岳县| 嘉禾县| 乌审旗| 旬阳县| 惠州市| 海兴县| 五家渠市| 铁岭市| 万州区| 元谋县| 深泽县| 诸城市| 朝阳区| 娄烦县| 蚌埠市| 从江县| 华安县| 商河县| 石泉县| 天祝| 鄂托克前旗| 呼图壁县| 安庆市| 呼玛县| 蒙山县| 郯城县| 南召县| 尖扎县| 汨罗市| 龙山县|