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

 
Drupal 6 không còn supporting PHP 4 từ March 1st 2014

Drupal 6 không còn supporting PHP 4 từ March 1st 2014

Drupal 6.0 was released almost 6 years ago in February 2008. The Drupal community is committed to release Drupal 6 bugfixes until Drupal 8.0 is released and with recent changes provide security fixes much longer.

Setup Xdebug, Acquia Dev Desktop, and Netbeans in Windows 7

Cấu hình Xdebug, Acquia Dev Desktop, và Netbeans trên Windows 7

I usually use linux, but for various reasons I've needed to use windows lately and so I figured I would setup Xdebug, Acquia Dev Desktop, and Netbeans in Windows.

Joomla cài đặt chậm hơn Drupal 6

Joomla cài đặt chậm hơn Drupal 6

Hai hệ quản trị nội dung này thay nhau làm mưa làm gió trong các cuộc thi. Đặc biệt ở cuộc bình chọn uy tín nhất của Packt Publishing, Joomla! và Drupal luôn chiếm giữ hai vị trí đầu bảng.

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

 

Diet con trung