Tag Archives for " Planet Drupal "

Webinar: How to Build Custom Search Pages in Drupal 8

The definition of “what a search page is” varies from project to project. Some clients are happy with the core Search module, others want a full blown search engine.

Drupal offers a wide range of options when it comes to building custom search pages. You can create a basic search page using the core Search module or if you’re looking for something advanced you could use Search API.

Continue reading

Webinar: Customize Content Pages using Display Suite in Drupal 8

If you ever need to modify content pages, Display Suite is a good choice. It offers a lot of flexibility without learning a brand new interface. You just use the standard “Manage display” page to select a layout and move fields into regions.

Yesterday, I presented a webinar on how to use Display Suite in Drupal 8. The webinar went for around 50 minutes and I covered the following:
1. What’s new in Drupal 8. 2. How to set up a Display Suite layout on a view mode. 3. How to change the wrapper elements. 4. How to add custom CSS classes. 5. How to use Display Suite fields. 6. How to use the “Display Suite Switch View Mode” sub-module. 7. And finally, how to override a layout.

Continue reading

Webinar: How to Manage Media Assets in Drupal 8

Yesterday I presented a webinar on how to manage media assets in Drupal 8. The webinar went for just over an hour and we looked at the current state of media management in Drupal 7 and what’s new in Drupal 8.

I spent the rest of the time demonstrating how to: Store media assets using Media Entity. Embedding assets using Entity Embed. Displaying a browser page to browse and select assets using Entity Browser.

Continue reading

How to Manage Media Assets in Drupal 8

Everyone has their own definition of media management. In this tutorial, I’m going to focus on three parts: Storing assets, Embedding assets, Browsing assets.
I want to give users the ability to create a media assets. Then have a button in the editor which they can use browse assets and then embed them.
We’ll utilize three modules to handle this: Media Entity, Entity Embed and Entity Browser.

Continue reading

Video: Create Custom Pages using Page Manager and Panels in Drupal 8

Yesterday I presented WebWash’s first webinar on Page Manager and Panels. I had lots of fun doing the presentation and was asked some pretty good questions at the end.

In the video I cover the following:

What’s new in Drupal 8.
Demonstrate how to create a custom page.
Show you how to use multiple variants.
Demonstrate Panels IPE (in-place editor).
Finally, I show you how to use Bootstrap Layouts.

Continue reading

How to Build Custom Pages Using Page Manager and Panels in Drupal 8

Panels has always been my go-to module when it comes to building custom pages in Drupal 7.

Now in Drupal 8 things have changed.

A lot of what Panels did in Drupal 7 has been moved over to Page Manager. Panels itself doesn’t offer a user interface and it is just a variant type in Drupal 8. Also, Page Manager is now its own project, whereas, in Drupal 7 it was part of the Ctools module.

Panels in Drupal 8 integrates with Page Manager and offers a custom variant type which allows you to select different layouts and manage blocks in the layouts. On its own, Panels doesn’t really do anything, you need something like Page Manager to utilize it.

So with that being said, what can Page Manager do?

Continue reading

Using Display Suite in Drupal 8: How to Use Switch View Mode Sub-module

In this tutorial series on using Display Suite, we’ve cover the two fundamental use-cases of the module: how to modify layouts and use Display Suite fields.

Now we’ll take a closer look at one of its sub-modules: “Display Suite Switch View Mode”.

The “Display Suite Switch View Mode” module allows an editor to switch which view mode is used on a content page. By default, Drupal will use the “Full content” view mode (if enabled) on content page, i.e., “node/1”.

But what if you want to choose between two different “Full content” view modes? Well this module has you covered.

So instead of being stuck with a single view mode, you could have one for a layout with a sidebar and another for pages with go full width.

In this tutorial, you’ll learn how to configure and use the”Display Suite Switch View Mode sub-module.

Continue reading

Using Display Suite in Drupal 8: How to Use Display Suite Fields

In the previous tutorial, you learnt how to customize content pages by using a Display Suite layout. Today, I want to show you how to use Display Suite fields.

Display Suite fields shouldn’t be confused with the standard field system. The best way to think of a field in Display Suite is as just a fancy formatter. The field will only render content.

You can’t use it to store values or define a widget like you can with the standard field system.

You’ve already seen this fields in action. If you select a layout you’ll notice a bunch of new fields appear.

These are Display Suite fields which are implemented by the module.

A field can be created in two fields: in code or through the Display Suite user interface (UI).

Today we’ll look at how to create fields using the Display Suite UI. In a future tutorial, you’ll learn how to implement a field in code.

Continue reading

Using Display Suite in Drupal 8: How to Customize Content Pages

You’ve just installed a fresh Drupal 8 website, created a few content types and attached fields to them. So far so good.

Now you want to customize the content pages. On the “Manage display” page you can re-order fields and disable them but you can’t move them into any type of region.

Display Suite enhances the “Manage display” page by offering a drag-and-drop interface for fields.

You can select different layouts and each layout has its own set of regions. The drag-and-drop interface then is used to move fields into these regions, all without writing a single line of code.

The real benefit in using Display Suite is you always have a standard workflow for modifying content pages.

If you’re working in a team, this is even more important; you want to standardize how entity types are customized. Or you’ll end up in a situation where each developer does things their own way.

Continue reading

How to Make Fields Persistent in Drupal 8

I wrote a custom module recently where I needed to programmatically attach a field; similar to how a Body field gets added to content types.

If you create a content type, via the “Content types” page, a Body field is automatically added to the content type. If you don’t need the field just delete it, but the default functionality is to have it added.

I wanted this same functionality in my custom module; when an entity is created a field is programmatically attached to it.

So I reverse engineered how the Body gets added to content types. In the Node module, the Body field is exported as field.storage.node.body.yml and the field is attached using the node_add_body_field function.

Continue reading
1 2 3