- Drupal 8 Blueprints
- Alex Burrows
- 366字
- 2021-07-03 00:03:27
Displaying content with views
Prior to Drupal 8, you would have to download a variety of contrib to use view; however, views is now in Drupal core!
Now that we already have the power of views within, let's go create a view.

If we now go to Structure | Views, we will see a page listing content already as per Fig 1.20. These are our default views that are part of Drupal core; we can modify them as much as we like. Now, let's create our very first view. For people new to Drupal, views can be very scary and confusing. We won't be afraid, so let's create our Related news view.
At the top of the page, you will see + Add view; by clicking on this, it will in fact allow us to create a new view. So, let's go ahead and do that now. We can see various fields on this page, but don't worry, we will go through each field now:
- View name: User-friendly name for our view. Drupal will create a machine name from this, which allows us to access when we try to alter it with code.
- Description: This description will appear on the Views admin page; it is more of a helper to other developers to explain what the view does.
- View settings:
- Show: We can select what type of entity we want to show, depending on which we will change the options next to this field.
- Tagged with: This allows us to filter by tags on the Views admin page.
- Sorted by: We can order our content in views.
- Page settings: If we want to create our view with a page first, we can do that, and we can also add some basic settings for the page; click on the Create a page checkbox, and you will see a whole bunch of fields to enter.
- Create a block: We can add blocks to content, and views allows us to create these to display our content.
- Mastering Visual Studio 2017
- Visual Basic程序開發(fā)(學(xué)習(xí)筆記)
- 摩登創(chuàng)客:與智能手機(jī)和平板電腦共舞
- Microsoft Dynamics 365 Extensions Cookbook
- Python Game Programming By Example
- Flask Web開發(fā)入門、進(jìn)階與實戰(zhàn)
- C語言最佳實踐
- JavaScript by Example
- GeoServer Beginner's Guide(Second Edition)
- ADI DSP應(yīng)用技術(shù)集錦
- Scala編程實戰(zhàn)(原書第2版)
- 大學(xué)計算機(jī)基礎(chǔ)實驗指導(dǎo)
- PHP 7+MySQL 8動態(tài)網(wǎng)站開發(fā)從入門到精通(視頻教學(xué)版)
- Java Web動態(tài)網(wǎng)站開發(fā)(第2版·微課版)
- Python滲透測試編程技術(shù):方法與實踐(第2版)