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

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.

主站蜘蛛池模板: 油尖旺区| 高要市| 渭南市| 南江县| 兴宁市| 栾川县| 修武县| 曲沃县| 无锡市| 牙克石市| 正宁县| 石门县| 文登市| 芮城县| 阿坝县| 屯昌县| 乐平市| 洛隆县| 大悟县| 南投市| 凤凰县| 彩票| 三亚市| 两当县| 永济市| 锦州市| 昆明市| 集安市| 苍梧县| 西林县| 乌苏市| 黔东| 海丰县| 岳阳县| 雷山县| 基隆市| 无极县| 营口市| 城市| 科技| 建平县|