Check your version

This video covers a topic in Drupal 7 which may or may not be the version you're using. We're keeping this tutorial online as a courtesy to users of Drupal 7, but we consider it archived.

Changes in Display Suite version 2

Video loading...

  • 0:01
    Display Suites for Drupal 7 - Changes in Display Suite v2
  • 0:03
    with Kristof De Jaeger
  • 0:04
    And in this screencast
  • 0:05
    I will talk about the changes that we have done for a second branch
  • 0:11
    for Display Suite for Drupal 7.
  • 0:13
    So there's a new branch since a week or two which merged a lot of work
  • 0:19
    that Aspilicious has done during an intern that he did at Crimson.
  • 0:26
    And we held a little sprint during Easter fixing a lot of issues.
  • 0:31
    And at this point the second branch is open and ready for testing.
  • 0:36
    I've added a documentation page to write down
  • 0:43
    all the changes that we have done.
  • 0:45
    But I will talk about those changes in the screencast
  • 0:48
    as well, because screencasts are fun to do.
  • 0:51
    So first of all, we have looked at the menu
  • 0:56
    structure and the usability and the discoverability of Display Suite.
  • 1:00
    And one of the problems was that at first in the first branch,
  • 1:05
    if you would click on the Display Suite,
  • 1:06
    you would go to another screen with a couple of options
  • 1:10
    depending on settings and other modules enabled.
  • 1:14
    And its main task-- mainly configuring
  • 1:18
    layouts for your entities during your Drupal installation-- well,
  • 1:21
    it wasn't even the first option.
  • 1:22
    So from now on clicking on Display Suite,
  • 1:26
    you come on a page with all your layouts directly.
  • 1:31
    So you got links to manage display, manage form.
  • 1:34
    And as you can see, the default forms
  • 1:40
    module that it comes with Display Suite
  • 1:41
    now supports mostly any entities.
  • 1:44
    So on content files, taxonomy, users, and comments.
  • 1:49
    It should work out of the box now.
  • 1:50
    I've also added field collection and the b module.
  • 1:53
    So that should be working as well.
  • 1:56
    So also the important one, your content types are at the top
  • 1:59
    because it's mostly the first thing that you're going to configure.
  • 2:06
    So all the other menu options, like Fields,
  • 2:09
    View Modes, CSS Classes, Views Displays, are now a menu tab here.
  • 2:13
    And the extras and search and also the really strange emergency tab
  • 2:20
    are also still available.
  • 2:21
    But the main thing this place will get there immediately.
  • 2:25
    So after that, you click on Manage Display.
  • 2:29
    One of the problems that a lot of users had
  • 2:31
    was that this vertical tab right here-- the layout for article
  • 2:35
    in default-- was the second one.
  • 2:38
    So they did not know what to do at this point.
  • 2:41
    So we make that the first one.
  • 2:43
    And also the only way to find out whether which
  • 2:51
    layout you had to pick, you had to read all the descriptions here.
  • 2:55
    So we've added preview images.
  • 2:58
    Which is kind of nice.
  • 2:59
    So you can easily switch between them
  • 3:02
    and choose the one that you like.
  • 3:05
    And if that's not all, say, for instance,
  • 3:08
    you have already configured all your fields here,
  • 3:12
    those fields will automatically be added to the first [INAUDIBLE]
  • 3:16
    region of the display.
  • 3:17
    So you don't lose your settings.
  • 3:20
    And I think that's quite important.
  • 3:23
    A lot of people complain about that.
  • 3:25
    And also this preview image, in case you want to switch from a layout,
  • 3:31
    you will also see them on the switch layout.
  • 3:34
    So fields and that going to content.
  • 3:38
    And that's saved.
  • 3:39
    So we've added some nice, cool things.
  • 3:43
    In case you are using panels or any other module
  • 3:48
    that has panel layouts with custom images,
  • 3:52
    there will also show up here.
  • 3:53
    I haven't got panels enabled so I can show you, but it does work.
  • 3:57
    Another thing on the Manage Display screen-- this is something
  • 4:01
    if you have the fields-- [INAUDIBLE] module Extras,
  • 4:05
    which comes with Display Suite-- has an option to override
  • 4:09
    the markup of any fields.
  • 4:12
    So it used to be a link somewhere next to the formatter.
  • 4:16
    And one of the problems there was merely performance, because we had
  • 4:21
    to load all the form elements onto this field, UI screen, which,
  • 4:27
    in case you had many fields, could be a really big problem,
  • 4:33
    because there were a lot of Form API fields and stuff like that.
  • 4:35
    We moved that into the cogwheel on the right.
  • 4:38
    So the format settings will have the default formatters from the field,
  • 4:44
    depending on the field of course.
  • 4:45
    But there you get the Field Template.
  • 4:48
    You can choose Full Reset, Minimal and Expert now has exploded.
  • 4:54
    We know the UI isn't really the best.
  • 4:58
    We're still looking into that to make it a little bit more friendly.
  • 5:01
    But it's kind of a limitation of field UI at this point,
  • 5:04
    but we'll try to make the best out of it.
  • 5:07
    So field templates are now in the cogwheel,
  • 5:10
    so that the performance will be a little bit better.
  • 5:15
    Of course, in case you didn't know that yet, those field
  • 5:19
    templates are defined in Extras.
  • 5:22
    You can set a default site-wide field template.
  • 5:26
    And by default there are theming functions,
  • 5:29
    but you can also create default ones if you would like to.
  • 5:32
    But we don't really encourage that, because fields and field templates,
  • 5:38
    depending on how many fields you have in your website,
  • 5:40
    can potentially slow it down.
  • 5:43
    But maybe we should add that as a warning.
  • 5:46
    So you can override your theming functions if you like.
  • 5:48
    That's probably the best option.
  • 5:50
    So let me go back to Displays.
  • 5:56
    One important thing here is we have completely changed the way
  • 6:01
    that the templates layouts look.
  • 6:03
    In that sense, you can now configure the wrappers through the UI.
  • 6:08
    So you have layout wrapper, which can be a span or a section,
  • 6:13
    article, header, footer, whatever.
  • 6:14
    Any kind of [INAUDIBLE] you like.
  • 6:16
    And also for the region.
  • 6:17
    So you can actually do really cool HTML 5 stuff right now.
  • 6:25
    So I think that's kind of important.
  • 6:27
    It was kind of the goal for the second branch.
  • 6:29
    We're still looking into how we're going to solve this
  • 6:32
    for themes that are on [INAUDIBLE], which
  • 6:37
    are exposing displays with layouts.
  • 6:42
    And how they can make sure it works for both versions,
  • 6:46
    because we have also removed a very important option--
  • 6:51
    or, well, a much-used option, which was called Hide the empty regions.
  • 6:57
    Instead of that, we have options to remove that.
  • 7:00
    And now we ship with Two columns stacked, for instance,
  • 7:04
    and a Fluid two columns stacked.
  • 7:05
    So in case you want regions not to be hidden
  • 7:07
    or if you want to hide them, you have
  • 7:11
    to select the right template file.
  • 7:13
    So the logic of hiding or printing a region
  • 7:16
    is now the responsibility of your template file.
  • 7:19
    It's kind of important to tell you.
  • 7:22
    That's one of the reasons that there is probably
  • 7:25
    going to be an upgrade path between the first and second branch,
  • 7:29
    because that's going to break a lot of websites out there.
  • 7:31
    And we don't really want that of course.
  • 7:36
    So I think on the Manage Display screen and templates
  • 7:39
    stuff are the most important stuff.
  • 7:42
    Let me go to Structure-- Display Suite, of course-- Extras.
  • 7:48
    So field templates have stayed.
  • 7:50
    Extra fields as well.
  • 7:53
    We have also moved the Disable Block Regions to Extras,
  • 7:59
    because it wasn't used that much.
  • 8:02
    We have added flag support, so any flag will
  • 8:06
    now be available as a flag field.
  • 8:09
    What have we done as well?
  • 8:13
    We have added a hidden region.
  • 8:14
    That was more a developer, I think.
  • 8:19
    It means that you can add fields to a hidden region on your layout.
  • 8:24
    And fields will be built, but they will not be printed.
  • 8:27
    And it's usually because people are implementing their own hooks
  • 8:31
    to add custom fields.
  • 8:34
    And so that the field will get built.
  • 8:37
    So most of the time, it's a developer reason.
  • 8:42
    A nice one here is Field permission.
  • 8:43
    So in case you don't know that-- let's save this configuration-- you
  • 8:51
    can create custom fields with Display Suite.
  • 8:53
    So you can add a code field, or a dynamic
  • 8:56
    or block or preprocess field.
  • 8:58
    In case you don't know that, there are videos on YouTube
  • 9:02
    where I explain all of this.
  • 9:04
    But let me give you an example.
  • 9:06
    A new code fields.
  • 9:10
  • 9:12
    Also you can now actually limit the field where it will appear.
  • 9:18
    In the first branch, if you would say,
  • 9:21
    this field will be available on a node,
  • 9:23
    it would be available on any kind of bundle
  • 9:26
    and on any view mode, which is kind of annoying.
  • 9:31
    It is possible to define it in code, so if you're a coder,
  • 9:35
    you can limit that via code.
  • 9:37
    Now you can also do that through the user interface.
  • 9:41
    But I was going to show you the field permissions.
  • 9:43
    So field code.
  • 9:46
    Some code.
  • 9:49
    And now if I go to People Permissions, let me see, Extras.
  • 9:56
    You can see that all fields in there-- it's actually all fields
  • 10:00
    that we exposed for Display Suite now have this permission,
  • 10:07
    say for links, view links on comment.
  • 10:09
    But where is our field that we have just made?
  • 10:12
    View a new code field on node.
  • 10:13
    So I can say that anonymous user can't see it, but only
  • 10:18
    the administrator, for instance.
  • 10:19
    So that's a really nice feature that we have added to the Extras.
  • 10:25
    Also importantly, Display Suite views-- which
  • 10:31
    is kind of a crazy one, but it still works,
  • 10:33
    of course-- the custom page title.
  • 10:36
    It's an option in the Extras.
  • 10:37
    It now has the ability also to hide the views title,
  • 10:42
    if you're looking at the page, for instance.
  • 10:45
    It was a bug-- there was a bug somewhere
  • 10:48
    in the first and second branch that has now been solved.
  • 10:51
    And one of those bugs kind of had a regression.
  • 10:55
    So we had to add this here.
  • 10:57
    So you can hide the page title of a view as well.
  • 11:01
    So let me go to Search now.
  • 11:05
    So there's an important change for Apache Solr,
  • 11:09
    in case you were using Apache Solr.
  • 11:13
    You can select the Apache Solr search here.
  • 11:17
    In case you're doing that, you do not
  • 11:19
    have to set the default search engine at the Search settings
  • 11:25
    to Display Suite.
  • 11:26
    So nothing else has changed here at this point.
  • 11:30
    So in case I would go and save this.
  • 11:34
    And let me go to Search settings now.
  • 11:37
    As you can see now, just use Apache Solr search,
  • 11:40
    and the default search module can be Apache Solr.
  • 11:44
    Display Suite will take over any path
  • 11:47
    that you can define now in Apache Solr, which is cool.
  • 11:50
    You used to have to toggle the Search display
  • 11:55
    and set this to default, or depending
  • 11:57
    on what you want of course.
  • 11:58
    That's not necessary anymore.
  • 12:00
    You do have to do this if you are still using Drupal core search.
  • 12:05
    You shouldn't really do Apache Solr or any other kind of search engine
  • 12:09
    is always better than Drupal core, of course.
  • 12:18
    So let me also go to one thing that we have removed from Extras,
  • 12:26
    in case you haven't noticed.
  • 12:28
    The contextual links are now by default enabled.
  • 12:33
    It's just something that we've heard people would enable
  • 12:36
    all the time, even only use that.
  • 12:39
    So we just moved it to Display Suite core.
  • 12:42
    And I think that's about it.
  • 12:45
    At this point we're not sure if we are
  • 12:48
    going to support an upgrade path.
  • 12:51
    One of the reasons is that the templates have changed quite a bit.
  • 12:56
    We moved the empty regions option, and the default templates
  • 13:01
    has also a little bit been altered.
  • 13:04
    So code-wise, there's not really a problem.
  • 13:08
    But it's really a problem of the default layouts.
  • 13:11
    So we don't want to risk telling people
  • 13:14
    to upgrade now at this point.
  • 13:17
    If people are using Display Suites layouts
  • 13:19
    and they have not really done a lot of custom CSS,
  • 13:23
    their sites will probably break.
  • 13:24
    But we're still investigating that.
  • 13:27
    We will see in the future.
  • 13:29
    Also there is a new hook available for developers and themers.
  • 13:37
    I think I've added that on the Changes page.
  • 13:45
    I think this is the issue.
  • 13:47
    So just before that, all the variables are sent out
  • 13:51
    to the template, there's an alter hook now available so
  • 13:54
    that you can actually do your changes depending on which entity
  • 14:01
    or which view mode, so you can add new regions
  • 14:04
    or whatever that you like to.
  • 14:07
    And there's also some new taxonomy formatters.
  • 14:12
    And I think that's about it at this point.
  • 14:14
    So second branch is available.
  • 14:18
    You can start testing.
  • 14:19
    We expect a release somewhere beginning of June, a first release
  • 14:24
    candidate, and a full release probably
  • 14:26
    after the Drupal dev dates.
  • 14:28
    So you've got a lot of time to start testing the second branch.
  • 14:32
    It is stable to use it in production.
  • 14:37
    We are going to test it as well.
  • 14:41
    Try it out and give us feedback and we will possibly fix it quite soon.
  • 14:49
    If you have small feature requests, it's time now to get them
  • 14:52
    into the second branch as well.
  • 14:55
    Depending on how much work it is or not,
  • 14:59
    we will add it to second branch.
  • 15:02
    So thank you for watching and happy layouting.
  • 15:05
Loading ...

Changes in Display Suite Version 2


This lesson covers all the updates/differences in the latest 2.x version versus other Drupal 7 releases. The new 2.x version of Display Suite is still in active development at the time that this video was published, but we want to make sure you know the changes that are coming when the new version is finally released. This video is very important to view if you are using Display Suite version 2 for the first time and have watched other videos in this series. It covers UI changes/updates as well as feature differences.

Additional resources: