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

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.

主站蜘蛛池模板: 泉州市| 新竹县| 开远市| 东乡族自治县| 若羌县| 珠海市| 塘沽区| 安仁县| 双江| 中方县| 措美县| 临西县| 永泰县| 云南省| 黄浦区| 桐城市| 黄梅县| 桐梓县| 台中市| 太谷县| 闽侯县| 安阳县| 蓬莱市| 佛山市| 永胜县| 三原县| 萍乡市| 通河县| 历史| 吉木萨尔县| 运城市| 福海县| 孟村| 昌都县| 泸州市| 龙门县| 宁波市| 桃园市| 衡东县| 盱眙县| 兰州市|