Customize display và form modes trong Drupal 8

Customize display và form modes trong Drupal 8

Last week as I was looking over the Drupal 8 landing page on Drupal.org, I noticed a section titled "Customize display and form modes" and my curiosity was piqued. I fired up an instance of Drupal 8 on Simplytest.me to take a look. After a bit of poking around, and a little bit of confusion, I sorted out what this new feature means for us. It's a pretty neat thing, but let me start by explaining the roots of this in Drupal 7, with the concept of "view modes."

You may not know what these are called in Drupal 7, but if you've ever made a node look different in the teaser view from the full node view, you've used view modes. When you go to the "Manage display" tab on a content type you can see some sub-tabs in the upper right corner. These are Drupal 7 view modes, and they let you change how a piece of content looks when viewed in different contexts. You can modify what appears in the sub-tab list by toggling a list in the "Custom Display Settings" at the bottom of the screen. You can extend and do more modification to this system in Drupal 7 using a module called Display Suite. (You can find out more about that in Drupal 7 with this free Display Suite video series.)

Customize display và form modes trong  Drupal 8

Now in Drupal 8 you have more control over defining the display modes available right in core, and you can do a similar thing for the form version (where people input data) versus the display version (where people see the finished result). You can manage these settings in a new administrative section under Structure called "Display Modes." You can create or modify the existing view modes that come with core. You can also work with form modes for the form side of things. When it comes to using your new display modes, you still access them in the same place, but you have an additional tab in Drupal 8. In Drupal 7 you have both the field and the field widget on the "Manage fields" tab of a content type. Now this has been broken into two tabs: "Manage fields" and "Manage form display." This gives you more flexibility over how things will appear when someone is looking at the form. The "Manage display" tab is still the same as it was in Drupal 7. In addition to content types, you can also manage view modes for users, taxonomy, comments, and custom blocks. Right now you can only manage form modes for users.

To see what all of this looks like, here's a quick video I recorded of me playing around with this new setup in Drupal 8.

Tags: 
Bạn thấy bài viết này như thế nào?: 
No votes yet
Ảnh của Tommy Tran

Tommy owner Express Magazine

Drupal Developer having 9+ year experience, implementation and having strong knowledge of technical specifications, workflow development. Ability to perform effectively and efficiently in team and individually. Always enthusiastic and interseted to study new technologies

  • Skype ID: tthanhthuy

Tìm kiếm bất động sản

 

Advertisement

 

jobsora

Dich vu khu trung tphcm

Dich vu diet chuot tphcm

Dich vu diet con trung

Quảng Cáo Bài Viết

 
Xây dựng Drupal 8 trên VirtualBox và Vagrant trong Windows

Xây dựng Drupal 8 trên VirtualBox và Vagrant trong Windows

The big problem, I see, is that almost all the tool-builders for OSS web software run either Mac OS X or a flavor of Linux,

Hướng dẫn Ghost - chia sẻ dữ liệu trên máy ảo

Hướng dẫn Ghost - chia sẻ dữ liệu trên máy ảo

Vậy là bạn đã hoàn thành Ghost cho 1 máy ảo mới và cách phân vùng, chia ổ, chia sẻ dữ liệu giữa máy thật và ảo rồi đó.Đôi chút kinh nghiệm chia sẻ cùng mọi người, hi vọng sẽ giúp ích được cho mọi người. Trên đây cũng mong nhận được góp ý của mọi người để mình khắc phục những hạn chế và điểm mạnh của bản thân.

Movies With Butter

Giới thiệu Drupal site: Movies With Butter

I was inspired to create Movies with Butter after reading about another site's migration from Pligg to Drupal with the Drigg module two years ago. If you wanted to build a Digg-like aggregator back then, your best options were Pligg and Drigg.

Công ty diệt chuột T&C

 

Diet con trung