Aten Design Group: Expressive Authoring with Layout Paragraphs

Planet Drupal - Wed, 2020/11/18 - 7:30pm
Expressive Authoring with Layout Paragraphs Justin Toupin Wed, 11/18/2020 - 11:30 Drupal User Experience The Authoring Experience Problem

Authoring experience is a huge concern for web teams everywhere. As it should be. The ability for digital publishers to keep up with the rapidly accelerating demands of their users, and the pace of their competitors, largely depends on providing easy-to-use, expressive tools for their teams to create compelling content.

In practice, this means that publishers need the ability to quickly produce rich digital content from a range of possible components: text, images, videos, social media assets, and so on. Authors should be able to mix various elements quickly and effortlessly, with simple controls for managing content flow and layout. Under the hood, content should be structured and predictable. We’ve written about this before: organizations cannot sacrifice structure for flexibility. They need both.

And yet authoring experience has been a major shortcoming of Drupal, often articulated by marketing and editorial leaders as, “Drupal is too complicated for my organization.”

Other platforms from across the entire spectrum of digital publishing systems – from Adobe Experience Manager to Wordpress, Squarespace to WiX – provide rich, intuitive tools for easily creating all kinds of digital content. What Drupal offers in terms of flexibility – powerful APIs, easily customizable structured content, and a huge range of content management features – has come at the expense of the authoring experience.

Layout Paragraphs

A while ago I wrote about Entity Reference with Layout (or ERL), a Drupal 8 module that combines Paragraphs with the Layout API for a more flexible, expressive authoring experience in Drupal. ERL had one concerning drawback: you had to use a special field type for referencing paragraphs. That means ERL wouldn’t “just work” with existing paragraph fields.

Layout Paragraphs, the successor to ERL, fixes that problem. The Layout Paragraphs module combines Drupal Paragraphs with the Layout API and works seamlessly with existing paragraph reference fields.

Video file

The Layout Paragraphs module makes it dead simple for authors to build rich pages from a library of available components. It offers drag-and-drop controls for managing content flow and layout, and works seamlessly with existing paragraph reference fields.

Layout Paragraphs features include:

  • Easily configure which content components, or paragraph types, are available to your authors wherever Layout Paragraphs is used.
  • A highly visual, drag-and-drop interface makes it simple to manage content flow and layout.
  • Site admins can easily configure Layout Paragraphs to support nested layouts up to 10 levels deep.
  • A “disabled bin” makes it easy to temporarily remove content elements without deleting them.
  • Layout Paragraphs works seamlessly with existing paragraph reference fields.
  • Authors can easily switch between different layouts without losing nested content.
  • Layout Paragraphs is fully customizable and works with Layout Plugins, Paragraph Behaviors, and other Drupal APIs.
What About Layout Builder?

While there are strong similarities between Layout Paragraphs and Layout Builder, Layout Paragraphs solves a fundamentally different problem than Layout Builder.

Layout Builder, in Drupal core, is a powerful system for managing layouts across an entire website. With Layout Builder, site administrators and content managers can place content from virtually anywhere (including custom blocks) within specific regions of a layout. Layout Builder is extremely powerful, but doesn’t directly solve the problem I mentioned above: “Drupal is too complicated for my organization.”

Layout Paragraphs adds a new interface for effortlessly managing content using Drupal Paragraphs. It is simple, fast, and expressive. Layout Paragraphs is a field widget, and works the same way as other Drupal fields. The Layout Paragraphs module makes it simple for publishers to create and manage rich content from a library of available components: text, images, videos, etc. Layout Paragraphs is completely focused on the authoring experience.

Try It Out

If you want to see Layout Paragraphs in action, simply download the module and give it a try. Setup is fast and easy. From the Layout Paragraphs module page:

  1. Make sure the Paragraphs module is installed.
  2. Download/Require (composer require drupal/layout_paragraphs) and install Layout Paragraphs.
  3. Create a new paragraph type (admin > structure > paragraph types) to use for layout sections. Your new paragraph type can have whatever fields you wish, although no fields are required for the module to work.
  4. Enable the “Layout Paragraphs” paragraph behavior for your layout section paragraph type, and select one or more layouts you wish to make available.
  5. Make sure your new layout section paragraph type is selected under “Reference Type” on the content type’s reference field edit screen by clicking “edit” for the respective field on the “Manage fields” tab.
  6. Choose “Layout Paragraphs” as the field widget type for the desired paragraph reference field under “Manage form display”.
  7. Choose “Layout Paragraphs” as the field formatter for the desired paragraph reference field under “Manage display”.
  8. That’s it. Start creating (or editing) content to see the module in action.

If you’re using Layout Paragraphs in your projects, we’d love to hear about it. Drop a note in the comments section below, or get involved in the issue queue.

Read This Next Justin Toupin

Chapter Three: Drupal Backender Learns Gatsby: Core JSON:API vs GraphQL 3

Planet Drupal - Wed, 2020/11/18 - 7:24pm

At BADCamp 2019 I attended Michael Schmid’s presentation on decoupled web site building and hosting. There, I learned about the GraphQL module that's been developed to do decoupled Drupal, instead of JSON:API. When I first started experimenting with Gatsby I decided to try it, not really knowing anything about GraphQL at the time. This made my experience trickier than it needed to be. As it turned out, all the tutorials and examples I could find for Drupal + Gatsby had query examples for gatsby_source_drupal with JSON:API. Once I got my head around GraphQL though, things were pretty slick.


Four Kitchens: Don’t Let a Bare-Bones Backend Design Leave Your Site Editors Stranded

Planet Drupal - Wed, 2020/11/18 - 7:17pm

From the consumer perspective, there’s never been a better time to build a website. User-friendly website platforms like Squarespace allow amateur developers to bypass complex code and apply well-designed user interfaces to their digital projects. Modern site-building tools aren’t just easy to use—they’re actually fun.

For anyone who has managed a Drupal website, you know the same can’t be said for your platform of choice. While rich with possibilities, the default editorial interface for Drupal feels technical, confusing, and even restrictive to users without a developer background. Consequently, designers and developers too often build a beautiful website while overlooking its backend CMS.

Drupal’s open-ended capabilities constitute a competitive advantage when it comes to developing an elegant, customer-facing website. But a lack of attention to the needs of those who maintain your website content contributes to a perception that Drupal is a developer-focused platform. By building a backend interface just as focused on your site editors as the frontend, you create a more empowering environment for internal teams. In the process, your website performs that much better as a whole.

UX principles matter for backend design as much as the frontend

Given Drupal’s inherent flexibilities, there are as many variations of CMS interfaces as there are websites on the platform. That uniqueness is part of what makes Drupal such a powerful tool, but it also constitutes a weakness.

The editorial workflow for every website is different, which opens an inevitable training gap in translating your site’s capabilities to your editorial team. Plus, despite Drupal’s open-source strengths, you’ll likely need to reinvent the wheel when designing CMS improvements specific to your organization.

For IT managers, this is a daunting situation because the broad possibilities of Drupal are often overwhelming. If you try to make changes to your interface, you can be frustrated when a seemingly easy fix requires 50 hours of development work. Too often, Drupal users will wind up working with an inefficient and confusing CMS because they’re afraid of the complexity that comes with building out a new interface.

Fortunately, redesigning your CMS doesn’t have to be a demanding undertaking. With the right expertise, you can develop custom user interfaces with little to no coding required. Personalized content dashboards and defined roles and permissions for each user go a long way toward creating a more intuitive experience.

Improving your backend design is often seen as an additional effort, but think of it as a baseline requirement. And, by sharing our user stories within the Drupal community, we also build a path toward improving the platform for the future.

Use Drupal’s Views module to customize user dashboards

One of the biggest issues with Drupal’s out-of-the-box editorial tools is that they don’t reflect the way any organization actually uses the CMS. Just as UX designers look to provide a positive experience for first-time visitors to your site, your team should aim for delivering a similarly strong first impression for those managing its content.

By default, Drupal takes users to their profile pages upon login, which is useful to . . . almost no one. Plus, the platform’s existing terminology uses cryptic terms such as “node,” “taxonomy,” and “paragraphs” to describe various content items. From the beginning, you should remove these abstract references from your CMS. Your editorial users shouldn’t have to understand how the site is built to own its content.

In the backend, every Drupal site has a content overview page, which shows the building blocks of your site. Offering a full list that includes cryptic timestamps and author details, this page constitutes a floodgate of information. Designing an effective CMS is as much an exercise in subtraction as addition. Whether your user’s role involves reviewing site metrics or new content, their first interaction with your CMS should display what they use most often.

If one population of users is most interested in the last item they modified, you can transform their login screen to a custom dashboard to display those items. If another group of users works exclusively with SEO, you can create an interface that displays reports and other common tasks. Using Drupal’s Views module, dashboards like these are possible with a few clicks and minimal coding.

By tailoring your CMS to specific user habits, you allow your website teams to find what they need and get to work faster. The most dangerous approach to backend design is to try and build one interface to rule them all.

Listen to your users and ease frustrations with a CMS that works

Through Drupal Views, you can modify lists of content and various actions to control how they display in your CMS. While Views provides many options to create custom interfaces, your users themselves are your organization’s most vital resource. By watching how people work on your site, you can recognize areas where your CMS is falling short.

Even if you’ve developed tools that aimed to satisfy specific use cases, you might be surprised the way your tools are used. Through user experience testing, you’ll often find the workarounds your site editors have developed to manage the site.

In one recent example, site editors needed to link to a site page within the CMS. Without that functionality, they would either find the URL by viewing the source code in another tab and copying its node ID number. Anyone watching these users would find their process cumbersome, time-consuming, and frustrating. Fortunately, there’s a Drupal module called Linkit that was implemented to easily eliminate this needless effort.

There are many useful modules in the Drupal ecosystem that can enhance the out-of-the-box editorial experience. Entity Clone expedites the content creation process. Views Bulk Operations and Bulk Edit simplify routine content update tasks. Computed Field and Automatic Entity Label take the guesswork out of derived or dependent content values. Using custom form modes and Field Groups can help bring order and streamline the content creation forms.

Most of the time, your developers don’t know what solutions teams have developed to overcome an ineffective editorial interface. And, for fear of the complexity required to create a solution, these supposed shortcuts too often go unresolved. Your backend users may not even be aware their efforts could be automated or otherwise streamlined. As a result, even the most beautiful, user-friendly website is bogged down by a poorly designed CMS.

Once these solutions are implemented, however, you and your users enjoy a shared win. And, through sharing your efforts with the Drupal community, you and your team build a more user-friendly future for the platform as well.

The post Don’t Let a Bare-Bones Backend Design Leave Your Site Editors Stranded appeared first on Four Kitchens.

Categories: Drupal 6 core security update for SA-CORE-2020-012

Planet Drupal - Wed, 2020/11/18 - 7:13pm

As you may know, Drupal 6 has reached End-of-Life (EOL) which means the Drupal Security Team is no longer doing Security Advisories or working on security patches for Drupal 6 core or contrib modules - but the Drupal 6 LTS vendors are and we're one of them!

Today, there is a Critical security release for Drupal core to fix a Remote Code Execution (RCE) vulnerability. You can learn more in the security advisory:

Drupal core - Critical - Remote code execution - SA-CORE-2020-012

Here you can download the Drupal 6 patch to fix, or a full release ZIP or TAR.GZ.

If you have a Drupal 6 site, we recommend you update immediately! We have already deployed the patch for all of our Drupal 6 Long-Term Support clients. :-)

FYI, there were other Drupal core security advisories made today, but those don't affect Drupal 6.

If you'd like all your Drupal 6 modules to receive security updates and have the fixes deployed the same day they're released, please check out our D6LTS plans.

Note: if you use the myDropWizard module (totally free!), you'll be alerted to these and any future security updates, and will be able to use drush to install them (even though they won't necessarily have a release on


Security advisories: Drupal core - Critical - Remote code execution - SA-CORE-2020-012

Planet Drupal - Wed, 2020/11/18 - 6:18pm
Project: Drupal coreDate: 2020-November-18Security risk: Critical 17∕25 AC:Basic/A:User/CI:All/II:All/E:Theoretical/TD:DefaultVulnerability: Remote code executionCVE IDs: CVE-2020-13671Description: 

Drupal core does not properly sanitize certain filenames on uploaded files, which can lead to files being interpreted as the incorrect extension and served as the wrong MIME type or executed as PHP for certain hosting configurations.


Install the latest version:

Versions of Drupal 8 prior to 8.8.x are end-of-life and do not receive security coverage.

Additionally, it's recommended that you audit all previously uploaded files to check for malicious extensions. Look specifically for files that include more than one extension, like .php.txt or .html.gif.

Reported By: Fixed By: 

Drudesk: How to generate a username automatically in a Drupal site with the Automatic User Names module?

Planet Drupal - Wed, 2020/11/18 - 3:13pm

First of all, generating a username automatically in your Drupal site is very useful for the site admins and website visitors. Let's start with the fact that today, to use the services of the site, users have to log in.

As a rule, registration includes filling in the following data:


Specbee: How to Configure Faceted Search for Drupal 8 (and 9) – An easy step-by-step tutorial

Planet Drupal - Wed, 2020/11/18 - 1:00pm
How to Configure Faceted Search for Drupal 8 (and 9) – An easy step-by-step tutorial Shefali And Shruthi 18 Nov, 2020 Top 10 best practices for designing a perfect UX for your mobile app

Faceted search offers users with a superior search experience by displaying filters against their search results. It is particularly useful for websites having large catalogues and listings. Once the user types in their search query, they will be presented with a list of relevant filter options to further narrow down their search. These filtering elements are facets.

Previously Facet API in Drupal 7, the Facet module in Drupal 8 enables your website with faceted searching abilities. Facets also supports Drupal 9! Let’s look at configuring and implementing Faceted search with Drupal’s own search server, Search API.

What is Faceted Search?

If your users are finding it hard to see what they are searching for even after keying in their search query, they are bound to get frustrated. Faceted search provides users with multiple filters at the same time for the various attributes of the content. The facets provided are based on the search query the user has executed. Facets will also display the number of matched results (usually within brackets) next to it. Let’s take a look at this below screenshot to understand Facets better-

In one of our recent Drupal 8 projects, a quick search for Homes in Columbia on this website presents to you with facets like Communities, Hot Deals, Quick Move-ins and more. You will also see the count of the results next to each facet. So, a query with “Columbia” keyword is sent to the search server to retrieve the already configured and indexed categories (Communities, Hot Deals, etc.)

Installing the Facets Module for Drupal 8

As previously discussed, we will be implementing Faceted search using Drupal’s Search API module. 

Step 1: Enabling the modules

Install and enable these modules
•    The Facet Module 
•    Search API module

Step 2: Creating Content Types

Create the content you would like to include in the faceted search by adding Content types as shown below. You can also use the default content types provided by Drupal.

   Step 2: Create Content Types
Step 3: Configuring the Search server

Navigate to Configuration -> Search and metadata -> Search-API from the admin interface to configure your search server. Give a name to your search server (here - data server). 

   Step 3: Configure the Search server


Step 4: Configuring the Search Index

Next, configure the search index to improve the search performance. Navigate to Configuration -> Search and metadata -> Search-API -> Index -> data_index.

    Step 4: Configuring the Search Index

Give a name to your index and then select Content as your Datasources since we will be indexing the Content entities here.
You can then move on to the next section - Configuring the Datasource (here – Content). Here you can choose to select all the bundles or only select a few from the below list to index.
Next, select your server that you had already created (here - data server). Select the “Index items immediately” option to begin the indexing process. Click on Save.

   Configuring the Datasource
Step 5: Adding Fields for Indexing

Next, we need to add Fields to be indexed. Navigate to Configuration -> Search and metadata ->Search API -> data index and select the Fields tab. Click on the Add fields button to create fields according to your requirement.

  Step 5: Adding Fields for Indexing
Step 6: Indexing the Content

Under the same location, click on the View tab to start the process of indexing your content. In the Start Indexing Now section, click on the Index Now button. It will then show you a progress bar with the status of the number of items that have been indexed.

   Step 6: Index the Content


Step 7: Creating a View

Now we will be creating a view for the data that needs to be indexed and displayed to your users. Navigate to Structure -> Views -> Add View.

   Step 7: Creating a View

Give a name for the View.
Under View Settings dropdown list, select the index that you have created in Step 4.
Create a page for your search results by clicking on the Create a page checkbox under the Page Settings tab. Give a name and a path for the same. 
Under Items to Display, select 0 if you want to display all the results in one page. Else, select a number of results to be displayed. 
Under Page Display settings, you can select the format in which you want to display your results – Table, Grid, HTML list or Unformatted list. We have selected Unformatted list here. Click on Save.

Step 8: Adding Fields to the View

Here we will be adding fields that we have indexed earlier to the View.
Go to Views, click on Add button next to the Fields section. Select the Fields, click on Add and Configure. 
Under Render Settings, select the Link to Content checkbox so that the results displayed are clickable. 
Click Save.

   Step 8: Adding Fields to the View
Step 9: Configuring the Facets

Now let’s begin configuring and enabling the facets. Navigate to Configuration -> Search and meta data -> Facets

Click on the Add Facet button.


  Step 9: Configuring the Facets

Select the Facet Source – This will be your View that you created previously.
Select the Field – This will display the fields you had added for indexing in Step 5.
Give a name to the Facet.
Click on Save.

Next, you will then see more configuration options for displaying the facets (as shown in the below image). Widgets will list out a number of options like List of links, array, dropdown, etc. You can choose what suits your website the best.
Select the “Transform entity ID to label” to avoid displaying the machine name of the content type.
Click on Save.

Configuring the FacetsStep 10: Placing the Facet blocks in the chosen page regions 

Next, place the Facets you created as blocks in a page region of your choice. 
Navigate to Structure -> Block Layout.
Select the region of the page where you would like to place the block containing the Facets.
Here, we are selecting Sidebar. Click on the Place Block button next to the Sidebar.
In the next dialog box, search for the Facet name and click on Place Block.


Step 10: Placing the Facet blocks in the chosen page regions

In the Configure Block section, mention the Search page path that you had previously created. Here -“site-search” is our page we had created. 
Give a display name for your Block and select the Display title checkbox if you want the block name to be displayed (here – Type).
Click on Save Block.

The Result

And just like that, your faceted search page and functionality is ready! Notice the Facet called Type (display name) that has Basic page and Article listed as content types to filter against.

Result: The Faceted Search Page


Implementing faceted search provides users with an easy and fast search experience. In this tutorial, we have used Search API as the search engine. You could also use search servers like Apache Solr, Search API Solr search or Elasticsearch with Drupal 8, whatever suits your requirements. As a leading Drupal development company, Specbee’s Drupal experts can help you build exemplary search experiences. Contact us to know more.

Drupal Planet Drupal 8 Drupal 9 Drupal Module Shefali ShettyApr 05, 2017 Subscribe For Our Newsletter And Stay Updated Subscribe

Leave us a Comment

  Shefali ShettyApr 05, 2017 Recent Posts Image How to Configure Faceted Search for Drupal 8 (and 9) – An easy step-by-step tutorial Image Evaluating a Drupal Partner for your Next Project – Some Unbiased Tips and Suggestions Image How to Import External Feeds into your Drupal 9 Website with the Feeds Module Want to extract the maximum out of Drupal? TALK TO US Featured Success Stories

Know more about our technology driven approach to recreate the content management workflow for [24]


Find out how we transformed the digital image of world’s largest healthcare provider, an attribute that defined their global presence in the medical world.


Discover how a Drupal powered internal portal encouraged the sellers at Flipkart to obtain the latest insights with respect to a particular domain.


Community Working Group posts: A different kind of contribution - become a trained Drupal event Code of Conduct contact

Planet Drupal - Mon, 2020/11/16 - 7:42pm

The Drupal Community Working Group is continuing to team up with Otter Tech to offer live, monthly, online Code of Conduct incident response training for the Drupal community.

At the time of this article, twenty community members have completed the training, ensuring that both in-person and online Drupal events world-wide have access to qualified Code of Conduct contacts.

Contribute to the community

Being a Code of Conduct contact for Drupal events is a great way to contribute to the community without coding. It is essential that community events are safe for all people and our Code of Conduct contacts are key to making that happen.

What is a Code of Conduct contact?

The role of a Code of Conduct contact is to be available on behalf of a virtual or in-person event to take incident reports and assist event organizers in responding to Code of Conduct violations.

Drupal event organizers typically identify at least two unique individuals that agree to be Code of Conduct contacts to help create a safe and welcoming environment for their attendees. These contacts and their contact information are made available to attendees on the event website, through event emails, in event presentations, etc. so that attendees know who and how to approach if an incident occurs.

What are the characteristics of a good Code of Conduct contact?
  • Trustworthy: This includes being able to keep information confidential as well as being reliable when it comes to being accessible during an event.
  • Approachable: Good contacts are seen as friendly, empathetic, and respectful. They listen carefully, appreciate the emotions and needs that underlie each conversation, and come across as genuinely concerned with the well-being of everyone involved.
  • Perceptive: Someone who can quickly grasp a situation, understand its complexities and dynamics, and provide a clearer understanding of options by analyzing the issues and identifying risk.
  • Impartial: To be effective, a contact must be able to control their feelings and not invest emotionally in the outcome.
About the workshop

The training is designed to provide "first responder" skills to Drupal community members who take reports of potential Code of Conduct issues at Drupal events, including meetups, camps, conventions, and other gatherings. The workshops will be attended by Code of Conduct enforcement teams from other open-source events, which will allow cross-pollination of knowledge with the Drupal community.

The workshop covers:
  • Tips for protecting reporter privacy
  • Frameworks for deciding consequences of inappropriate behavior
  • Discussion on bias, intent, and microaggressions
  • Discussion on personal conflicts, false reporting, and power dynamics
  • 40 minutes total of Q&A time
  • Interactive practice enforcing a Code of Conduct
Upcoming workshops

Saturdays, 9am to 1pm US Pacific Time
(Saturday, 5pm to 9pm UTC)

Workshop cost

The standard cost of the workshop is $350, but Otter Tech has offered a $50 discount for Drupal community members. To receive the discount, let us know you are interested by completing the following form.

$50 discount sign-up form

An additional subsidy of $100 is available for the December 5, 2020 workshop. Subsidies will be provided based on reported need as a way to make this training opportunity available to more of our community.

$50 discount + $100 subsidy sign-up form

After completion

Drupal community members who successfully complete the workshop will receive a community contribution credit on and may be listed on (in the Drupal Community Workgroup section) as a means to highlight that they have completed the training.

We are fully aware that the fact that the workshops will be presented in English limits who will be able to attend. We are more than interested in finding additional professional Code of Conduct workshops in other languages. Please contact us if you can assist.


DrupalCon News: DrupalCon Europe will only sustain if you show up for it

Planet Drupal - Mon, 2020/11/16 - 3:53pm

If Drupal in Europe is important to you, we need your help! Read on to see how.


clemens-tolboom pushed to master in KennisnetwerkDataScience/Wifi-punten-in-Leeuwarden

On github - Fri, 2020/11/13 - 8:15pm
clemens-tolboom pushed to master in KennisnetwerkDataScience/Wifi-punten-in-Leeuwarden Nov 13, 2020 2 commits to master
  • a475b3b Merge pull request #12 from KennisnetwerkDataScience/dependabot/pip/G…
  • 2ca966d Bump tensorflow from 1.15.2 to 2.3.1 in /Groep 5

clemens-tolboom merged a pull request in KennisnetwerkDataScience/Wifi-punten-in-Leeuwarden

On github - Fri, 2020/11/13 - 8:15pm
clemens-tolboom merged a pull request in KennisnetwerkDataScience/Wifi-punten-in-Leeuwarden Nov 13, 2020 Bump tensorflow from 1.15.2 to 2.3.1 in /Groep 5 #12

Bumps tensorflow from 1.15.2 to 2.3.1. Release notes Sourced from tensorflow's releases. TensorFlow 2.3.1 Release 2.3.1 Bug Fixes and Other Changes

+1 -1 1 comment

clemens-tolboom commented on pull request KennisnetwerkDataScience/Wifi-punten-in-Leeuwarden#12

On github - Fri, 2020/11/13 - 8:15pm
clemens-tolboom commented on pull request KennisnetwerkDataScience/Wifi-punten-in-Leeuwarden#12 Nov 13, 2020 clemens-tolboom commented Nov 13, 2020

This will probably break some code ... but it's for the greater good and will be noticable through this PR

clemens-tolboom pushed to main in clemens-tolboom/godot_3_spawn_points

On github - Fri, 2020/11/13 - 6:05pm
clemens-tolboom pushed to main in clemens-tolboom/godot_3_spawn_points Nov 13, 2020 1 commit to main
  • 59c610d #17: alert user for WaveManager2D parent.

clemens-tolboom starred Timofffee/GodotIRC

On github - Fri, 2020/11/13 - 12:06pm
clemens-tolboom starred Timofffee/GodotIRC Nov 13, 2020 Timofffee/GodotIRC

IRC client on Godot engine

GDScript 8 Updated Nov 13

Promet Source: New Website Ignites New Growth Trajectory

Planet Drupal - Thu, 2020/11/12 - 11:35pm
When a family business that’s been run by three successive generations grows to $100 million in annual revenue by continuously building upon a track record of service, integrity, and quality, who’s to say that an outdated, uninspiring website isn’t doing enough heavy lifting? That was the case at Binford Supply for many years, until new ownership and a new media manager set out to update the site and take the company to the next level. 

Aten Design Group: Absolute menu links in Drupal 8

Planet Drupal - Thu, 2020/11/12 - 8:15pm
Absolute menu links in Drupal 8 Joel Steidl Thu, 11/12/2020 - 12:15 Drupal Code

Creating absolute menu links in Drupal 8 is pretty simple, but it took a little thought to land on the best solution for my use case. I ran into the requirement while working with a client to deploy their site navigation to a REACT app sitting on a different domain. The menu links we pulled in from their primary website needed to point back to their domain correctly, which of course meant they needed to be absolute.

A quick search turned up a couple of solutions, but none that quite suited my requirements. Here’s what I came up with — it’s fairly concise, leaves the menu link attributes intact, and doesn’t involve the theme layer.

/** * Implements hook_preprocess_menu(). * */ function MYTHEME_preprocess_menu(&$variables) { // Limit to specific menus for performance. $menus = ['main', 'footer']; if (isset($variables['menu_name']) && in_array($variables['menu_name'], $menus)) { MYTHEME_set_menu_items_to_absolute($variables['items']); } }   /** * Recursively make menu items link with absolute. * */ function MYTHEME_set_menu_items_to_absolute(&$items) { foreach ($items as $item) { $url = $item['url']; if (!$url->isExternal()) { $item['url'] = $url->setOption('absolute', TRUE); } // Recursively loop of sub-menu items. if (isset($item['below'])) { MYTHEME_set_menu_items_to_absolute($item['below']); } } }

Generating absolute menu links this way means I can pull main navigation onto various apps without any headache and without sacrificing any Drupal theme layer functionality.

You can download the gist here. Make sure you specify which menus you'd like to act on, by machine name, in the first line of the MYTHEME_preprocess_menu() function. The code goes in mytheme.theme — don't forget to replace MYTHEME with your theme name throughout.

Do you have a simpler way? Feel free to share in the comments.


OSTraining: OSTips - Create a Drupal Site Copy in Acquia’s DevDesktop

Planet Drupal - Thu, 2020/11/12 - 6:03pm

So you're working away on your Drupal site using Acquia’s DevDesktop just like we do here at OSTraining, and you want to take a snapshot of your site to use for another project. Or maybe you just want to keep a backup of it at a certain state in your Drupal site development.

In this video, I'm going to show you exactly how to create Drupal site copy in Acquia’s DevDesktop.  It's really simple. 

Let's get to It.