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

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.

主站蜘蛛池模板: 岳西县| 凤冈县| 阜南县| 新邵县| 福鼎市| 海城市| 迭部县| 县级市| 彩票| 黄平县| 东至县| 会东县| 卢龙县| 涟源市| 清水县| 屏南县| 武鸣县| 洱源县| 靖边县| 花莲县| 明光市| 饶河县| 驻马店市| 博湖县| 水城县| 梅州市| 上林县| 揭阳市| 孟津县| 万载县| 金乡县| 司法| 施秉县| 宣汉县| 宁明县| 崇义县| 绥棱县| 肥乡县| 获嘉县| 万山特区| 赣州市|