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

Views

Once you have started to create content, it won't be very long before you find yourself in a situation where you need to create lists of it, as follows:

  • A list of article titles with each title linked to the article detail
  • A list of article "teasers" (shortened versions) linked to the full detail
  • A list of articles associated with a particular taxonomy term

The core module Views is a powerful module that enables you to do all this and much more.

Views is a powerful and flexible query-building and content-display tool that can be used to build complex content listing pages to present your content the way you want.

You can specify the number of items to display in a list and publish your view to a specific URL (a page) or as a block to be included on one or more pages.

There are a number of built-in views included in the standard profile, which we will explore later. For example, Drupal enables you to quickly and easily mark content to be "Promoted to the front page" and the following screenshot shows the default Drupal front-page View, which lists all that content:

The Views module has been a staple of the Drupal site builders' toolkit for many years, but Drupal 8 is the first version of Drupal to include Views in the core module set.

In short, Views is a flexible query-building and content-display tool that can be used to build and present complex sets of filtered content. Views is so popular that almost every Drupal site uses it in some form or another. For this reason, the decision was made to move it into the Drupal 8 core.

You will see how to create views in detail later in Chapter 6, Structure.

主站蜘蛛池模板: 五莲县| 肇源县| 绍兴县| 沙田区| 龙岩市| 鲁山县| 东乌珠穆沁旗| 洪雅县| 华宁县| 崇礼县| 乌拉特后旗| 格尔木市| 阜平县| 景谷| 永登县| 云安县| 仁寿县| 额尔古纳市| 马尔康县| 鹤山市| 平凉市| 嵊泗县| 台山市| 南宁市| 连州市| 石阡县| 湟中县| 德清县| 梁山县| 二连浩特市| 西畴县| 噶尔县| 定日县| 齐齐哈尔市| 佛山市| 武乡县| 柞水县| 常州市| 独山县| 三门峡市| 台湾省|