Drupal

Tameesh Biswas | Blog: Gsoc17 : Client Side File crypto : Week 11

Planet Drupal - 15 August 2017 - 3:16pm
Gsoc17 : Client Side File crypto : Week 11

This blog post summarizes the eleventh week of writing open-source code for Drupal with Google Summer of Code.

The module is finally complete with most of it’s major features. It is complete for testing and a bit more changes are to be made that have been discussed, suggested and some things that were planned and are left to implement.

tameeshb Wed, 08/16/2017 - 03:46 Tags GSoC Google Summer of Code 2017 Drupal Drupal Blog
Categories: Drupal

Pattern Labs Command

New Drupal Modules - 15 August 2017 - 2:59pm

Console commands for working with pattern labs

Categories: Drupal

Excel LibXL

New Drupal Modules - 15 August 2017 - 1:37pm

This module provides an Excel encoder via LibXL Library (commerce) for the Drupal 8 Serialization API. This enables the XLS and XLSX format to be used for data output.

Categories: Drupal

Mediacurrent: Accessibility, Nachos, and a Responsibilities Document

Planet Drupal - 15 August 2017 - 12:17pm

I had this blog post written last week but didn’t publish because it felt wrong. It wasn’t until earlier today, when I was listening to one of my favorite public speakers, that I realized it was because I was talking at you, not to you. In truth, whenever I’ve discussed this document I keep talking about the what its purpose is and how it could bring value to our Drupal community but not why you should care.

Categories: Drupal

Elevated Third: Decoupled Drupal Technologies and Techniques

Planet Drupal - 15 August 2017 - 11:17am
Decoupled Drupal Technologies and Techniques Decoupled Drupal Technologies and Techniques Joe Flores Tue, 08/15/2017 - 12:17

Part 3 in this series is continued from a previous post, Decoupled Drupal: A 10,000ft View.

One of the main considerations when building the POWDR website was uniformity. POWDR is a holding company composed of many separate companies, all with individual websites. In order to ease the burden on content admins, we sought a solution that avoided multiple content types for each separate site. As a holding company with so many websites to maintain, managing many content types can become really complicated really quickly. It was our job to keep the content admins at top of mind in order to make their job updating the various websites as easy as possible.

Drupal Multisite for Easier Administration

The reason we ended up going with a multisite is that for each POWDR property there is a separate Drupal instance. In typical ski industry form, POWDR continues to acquire additional resorts and companies. They are constantly bringing on companies with different processes, different applications, and different third-party vendors. Many have different teams acting as admin. So, one of our first considerations was how people on the main POWDR team were going to administrate and edit all of this content.

We considered doing it all in one large API site though that plan quickly became too complicated when it came to permissions. Instead, it was decided that the project would be split up into multiple sites. Acquia made this process nice and easy. Using Acquia and Drupal 8, we were able to spin up a new multisite instance within the parent Drupal instance.

After some practice, we are now able to spin up a new instance in a matter of minutes. Using Drupal 8 and configuration, we copy the configuration from a parent skeleton site into a new site This allows the design team to start their development process with a basis on the API side without us having to reprogram and rebuild from the ground up.

Paragraphs Makes Complex Content Manageable

Working with Hoorooh Digital, we created an overarching entity structure using paragraphs that allowed us to make a baseline unit to build upon. Each paragraph was essentially a different piece of the website. They made components within Angular line up with paragraphs on the Drupal side. If you’re not familiar with paragraphs, in Drupal 8, their entities in and of themselves. This was nice for us because it allowed us to load and alter them programmatically, much like any other entity on the backend. They could be rearranged and served to the frontend from any site to meet design needs.

Implementation was one of the larger challenges of the POWDR project. The difficulty arose as we matched up the frontend to the Drupal backend. Custom code was required to ingest the paragraphs in the components. If you’re thinking about taking on this project, be sure to consider this step during the estimation process. In our experience, a good portion of the frontend development was required to render frontend components. We took the time to decide how componentry and paragraphs would be ingested from the Drupal platform, then matched up with the frontend framework. This allowed us to standardize all of the content coming out of the API so that frontends wouldn’t have to be rewritten for every site.

D8 and JSON REST API Decrease Development Time

The real power here was that, out-of-the-box, Drupal 8 does have a JSON REST API. We took that and ran with it. We realized early on that the Angular frontend and the out-of-the-box JSON API were going to require a lot of work to get them to work together. Instead of sacrificing this time, we extended the JSON encoder class in Drupal 8 and created our own POWDR format JSON encoder. This allowed us to create a serializer service and a bunch of custom entity normalizers. We then added related entities and some custom processing to meet the frontend needs. Out-of-the-box, the JSON API is built so that you’re requesting each related entity down the line. You get an entity ID and then you make another call to the API to get the content of that entity.

Essentially, what we did by extending the JSON encoder and all the entity normalizers was create an entity reference class. By using this structure we were able to load related entities, such as paragraphs and media, all on the same parent node, enabling the JSON encoder and all the entity normalizers to load the related entities and be served up as pieces on the API call. This gave POWDR the ability to create pages in much of the same structure that they’d be using on the frontend. The content admin sees a structure similar to the frontend and their API calls. POWDR is building pages on the backend in much the same way that they’re coming out on the frontend. This saves a lot of these extra extraneous API calls.

One of the great things about Drupal 8 is that it is built on Symfony, and incorporates a lot of modern PHP concepts, which helped our development of this custom API move quickly. Using Drupal 6/7, we would have to build from the ground up then figure out how the API was going to call itself. Instead, we just extended the class, extended a few other classes and, in a matter of days, had at least a working model for the design team to work from.

Overall, development was much faster for this project. Since everything was an entity point the back end API could load taxonomies, media, paragraphs in the same way and they also looked the same. This meant the design team could be presented something that is agnostic to the backend functionality but still utilizes Drupal’s media power.

To Be Continued...

In the next post of this series our hosting Partner, Acquia will cover the ins and outs of the POWDR project’s frontend design. Stay tuned!

Categories: Drupal

Web Wash: Moving Forward with Webform in Drupal 8

Planet Drupal - 15 August 2017 - 10:00am
In part two of our Webform tutorial, we’ll show you how to create multipage forms, apply conditional logic, create layouts and much more! We’ll take the simple newsletter signup form created in part one of this tutorial and add additional pages. Then we’ll demonstrate how to show or hide an element depending on the selection made on another element. We’ll also look at layouts and then finish off with an overview of some of the other great features Webform has to offer. For forms with many elements, it’s best to spread them across two or more pages. In this section, we’ll take the form we created in part one and move some of the elements to make a two page form. We’ll also add a preview page and make changes to the confirmation screen.
Categories: Drupal

Mediacurrent: Mediacurrent to Present at Decoupled Dev Days NYC

Planet Drupal - 15 August 2017 - 9:14am

The Mediacurrent team is excited to be supporting the inaugural Decoupled Dev Days event in NYC this week (August 19-20) as organizers and sponsors! We hope you’ll be joining us, however, we know how busy summer weekends can be so we will be sharing session recordings after the event.
 

Categories: Drupal

JSON Form

New Drupal Modules - 15 August 2017 - 7:21am

This module allows you to generate HTML forms from JSON Schemas using JSON Forms library.

These forms values will be translated to string and saved into a long text plain field type.

You only need to configure the widget with the desired form structure and the default value (if needed).

Usage examples here

Categories: Drupal

InternetDevels: The Entity Browser module in Drupal 8: mission and configuration

Planet Drupal - 15 August 2017 - 7:01am

Creating unique content is a direct way both to Google’s and your customers’ hearts, and Drupal 8 is making the road much smoother and the journey more enjoyable! Creating interactive HTML5 content and content modelling in Drupal 8 are just a couple of examples we’ve already described.

Read more
Categories: Drupal

REST Absolute URLs

New Drupal Modules - 15 August 2017 - 5:29am

REST Absolute URLs is a tiny module which replaces relative file / image URLs with absolute URLs in the content fields when they are exposed to any Headless D8 successor (like JSON API or any other).

Categories: Drupal

Drupal Modules: The One Percent: Drupal Modules: The One Percent — Pagerer (video tutorial)

Planet Drupal - 15 August 2017 - 5:23am
Drupal Modules: The One Percent — Pagerer (video tutorial) NonProfit Tue, 08/15/2017 - 07:23 Episode 31

Here is where we bring awareness to Drupal modules running on less than 1% of reporting sites. Today we'll consider Pagerer, a module which offers many options when customizing your pagers.

Categories: Drupal

Views Zurb Foundation

New Drupal Modules - 15 August 2017 - 5:23am
Overview

The Views Zurb Foundation module adds styles to Views to output the results of a view
as Zurb Foundation 6 Block Grid (see Zurb Foundation Block Grid). This module is based on Views Bootstrap and altered for Zurb Foundation.

Categories: Drupal

Views Format HMS

New Drupal Modules - 15 August 2017 - 3:11am

Drupal views_format.hms.module README.txt
============================

Module adds an extra option for formatting of integer fields in views output without requiring custom templates

Categories: Drupal

Colorfield: Payment and Mollie on Drupal 8

Planet Drupal - 15 August 2017 - 1:22am
Payment and Mollie on Drupal 8 christophe Tue, 15/08/2017 - 10:22 Mollie provides a facade for several payment methods (credit card, debit card, Paypal, Sepa, Bitcoin, ...) with various languages and frameworks support. In some cases, you could decide to use the Payment module instead of the full Commerce distribution. This tutorial describes how to create a product as a node and process payment with Mollie, only via configuration. A possible use case can be an existing Drupal 8 site that just needs to enable a few products (like membership, ...).
Categories: Drupal

Commerce postcode delivery

New Drupal Modules - 15 August 2017 - 1:13am

Delivery charges based on postal code, time-for-delivery (2 hour, 4 hour, or 24 hour), or any other use case. The module can be extended by developers to suit their specific use case.

Go to the Commerce shipping add method page, add the shipping method provided herewith, and upload a CSV file (format mentioned in the help section). That's it, you're all set.

Categories: Drupal

Media entity icon

New Drupal Modules - 15 August 2017 - 1:06am

Media entity icon provides SVG sprites and SVG icons as assets via the Media entity module and can automate icons and thumbnails creation.

Synopsis

While icons and sprites are often proposed by themes in a defined context, they could also be assets provided to contributors. Font icons were proposed to the contributors via CSS classes but with the progressive drop of the older browsers SVG become the new standard (better consistency between browsers, more CSS control, ...).

Categories: Drupal

Agiledrop.com Blog: AGILEDROP: Accepted Business Sessions for DrupalCon Vienna

Planet Drupal - 14 August 2017 - 11:27pm
This year European DrupalCon will take place in Vienna, Austria. It's still more than a month away. However, the sessions were already selected. We will look at the ones, which were accepted in the business track. And we will also explain why. DrupalCon Vienna is one of the biggest Drupal events in the world this year. Therefore, some of our team members will be present at the event in the capital city of Austria. But once again our AGILEDROP team will not be just present at the event. We had a »bigger« role. Namely, our commercial director Iztok Smolic was invited to the Business track… READ MORE
Categories: Drupal

From buytaert.net to dri.es

Dries Buytaert - 14 August 2017 - 5:12pm
I recently was able to obtain the domain name dri.es so I decided to make the switch from buytaert.net to dri.es. I made the switch because my first name is a lot easier to remember and pronounce than my last name. It's bittersweet because I've been blogging on buytaert.net for almost 12 years now. The plan is to stick with dri.es for the rest of the blog's life so it's worth the change. Old links to buytaert.net will automatically be redirected, but if you can, please update your RSS feeds and other links you might have to my website.
Categories: Drupal

Decoupled Blocks: Vue.js

New Drupal Modules - 14 August 2017 - 4:08pm

This is a Vue.js implementation for the Decoupled Blocks module. Blocks built with Vue.js can now easily be added to a site via a module or in a custom theme.

Categories: Drupal

Acquia Lightning Blog: Round up your front-end JavaScript libraries with Composer

Planet Drupal - 14 August 2017 - 3:03pm
Round up your front-end JavaScript libraries with Composer phenaproxima Mon, 08/14/2017 - 18:03

In Lightning 2.1.7, we’re finally answering a long-standing question: if I’m managing my code base with Composer, how can I bring front-end JavaScript libraries into my site?

This has long been a tricky issue. drupal.org doesn’t really provide an official solution -- modules that require JavaScript libraries usually include instructions for downloading and extracting said libraries yourself. Libraries API can help in some cases; distributions are allowed to ship certain libraries. But if you’re building your site with Composer, you’ve been more or less on your own.

Now, the Lightning team has decided to add support for Asset Packagist. This useful repository acts as a bridge between Composer and the popular NPM and Bower repositories, which catalog thousands of useful front-end and JavaScript packages. When you have Asset Packagist enabled in a Composer project, you can install a Bower package like this (using Dropzone as an example):

$ composer require bower-asset/dropzone

And you can install an NPM package just as easily:

$ composer require npm-asset/dropzone

To use Asset Packagist in your project, merge the following into your composer.json:

"repositories": [ { "type: "composer", "url": "https://asset-packagist.org" } ]

Presto! You can now add Bower and NPM packages to your project as if they were normal PHP packages. Yay! However...

Normally, asset packages will be installed in the vendor directory, like any other Composer package. This probably isn’t what you want to do with a front-end JavaScript library, though -- luckily, there is a special plugin you can use to install the libraries in the right place. Note that you’ll need Composer 1.5 (recently released) or later for this to work; run composer self-update if you're using an older version of Composer.

Now, add the plugin as a dependency:

$ composer require oomphinc/composer-installers-extender

Then merge the following into your composer.json:

"extra": { "installer-types": [ "bower-asset", "npm-asset" ], "installer-paths": { "path/to/docroot/libraries/{$name}": [ "type:bower-asset", "type:npm-asset" ] } }

Now, when you install a Bower or NPM package, it will be placed in docroot/libraries/NAME_OF_PACKAGE. Boo-yah!

Let's face it -- if you're using Composer to manage your Drupal code base and you want to add some JavaScript libraries, Asset Packagist rocks your socks around the block.

BUT! Note that this -- adding front-end libraries to a browser-based application -- is really the only use case for which Asset Packagist is appropriate. If you're writing a JavaScript app for Node, you should use NPM or Yarn, not Composer! Asset Packagist isn't meant to replace NPM or Bower, and it doesn't necessarily resolve dependencies the same way they do. So use this power wisely and well!

P.S. Lightning 2.1.7 includes a script which can help set up your project's composer.json to use Asset Packagist. To run this script, switch into the Lightning profile directory and run:

$ composer run enable-asset-packagist
Categories: Drupal

Pages

Subscribe to As If Productions aggregator - Drupal