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

Starting to build our site

Now that we have a basic plan of our site's static content, we can start to build the static elements of our site.

Using taxonomy

Let's start with taxonomy. Since this is a way of categorizing content, it makes sense to set this up before we start creating content.

Creating the vocabulary

We need to go to Structure | Taxonomy | Add vocabulary to define a group of terms to categorize our content with. Enter a name of Dinosaur Breed and a description of specific breed of dinosaur, before clicking the Save button. We will use this to categorize content which relates to specific breeds of dinosaur:

With the vocabulary created, we now need to add terms to it, using the add terms link:

Here we can add the various breeds of dinosaur to the vocabulary using the create term form:

Now that we have a new vocabulary with terms associated with it, we need to link it to the appropriate content types. We need to go to Structure | Content types | Basic page | Manage fields.

From here, we enter Dinosaur Breed as the field label, dinosaur_breed as the field name, Term reference as the field type, and Select list as the Widget:

Next, we select Dinosaur Breed as the vocabulary to use:

Finally, we ensure the field is set as required, and that the maximum number of values is set to 1:

Now, if we go to create a page, we can select the breed of dinosaur it relates to:

Now we have a new page created, related to T-Rex:

If we click the taxonomy term, we are taken to a page listing content which has been categorized as T-Rex related:

Tip

Try it yourself

Now that you have an understanding of how to create content, why not create all of the static content we planned earlier. Make sure you select a menu for the pages to appear in. Once you have done that, why not create a Frequently Asked Questions page; use taxonomy to tag pages as FAQ answers and use the Drupal link to all content tagged with FAQ answers as the link to the FAQs pages in the menu.

主站蜘蛛池模板: 道真| 碌曲县| 宜君县| 绥滨县| 长春市| 左权县| 元江| 兴文县| 徐水县| 苗栗市| 西贡区| 德江县| 海丰县| 南溪县| 高唐县| 四平市| 平山县| 东乌珠穆沁旗| 民勤县| 丹江口市| 宜阳县| 柏乡县| 沐川县| 高青县| 五峰| 伊川县| 法库县| 贺州市| 东丽区| 龙川县| 巧家县| 临漳县| 车险| 松江区| 龙山县| 黔西| 石台县| 驻马店市| 阆中市| 广安市| 山阳县|