Drupal

Group Behavior

New Drupal Modules - 20 October 2018 - 12:14pm

THis module provides options to have a group content behave like a group, by creating, updating and deleting a group whenever content is created, updated, deleted. For the roadmap see #3008016: Add the option to have any entity behave as group.

Categories: Drupal

Netgíró

New Drupal Modules - 20 October 2018 - 11:18am

Netgíró clears payments through the payment module. When using this module with Drupal Commerce the Payment for Drupal Commerce.

Sponsor

Modifications inital development was sponsored by Netgíró

Categories: Drupal

Dynamic Asset

New Drupal Modules - 20 October 2018 - 6:40am

This module give you the ability to add dynamic css / js to your website.
After adding this module you can define dynamic options in your assets and define it's route to load them dynamically.

Categories: Drupal

CalculatedRate

New Drupal Modules - 20 October 2018 - 12:55am

The Calculated Rate field allows you to leverage token and other fields in a way to create calculated values that can show for content elements. For example what if you needed to calculate how much something cost based on a set of conditions? Currently, this requires a bit of custom code. This module aims to create a field that provides the ability to do something similar from the UI.

Categories: Drupal

Fast Token Browser

New Drupal Modules - 19 October 2018 - 11:31am

Fast Token Browser extends the Token module to provide an improved interface for browsing and inserting Tokens. It resolves the excessive memory usage and unresponsive interface when using the token browser on a site with a large number of tokens. It also allows the token browser to work with a very low PHP memory limit without needing to constrain the maximum token depth.

You do not need Token Tweaks if you install this module, though having both installed will not cause any conflicts.

Categories: Drupal

Mass.gov Digital Services: Join our growing team at Massachusetts Digital Services

Planet Drupal - 19 October 2018 - 10:08am

Today, more than 80% of people’s interactions with government take place online. Whether it’s starting a business or filing for unemployment, too many of these experiences are slow, confusing, or frustrating. That’s why, one year ago, the Commonwealth of Massachusetts created Digital Services in the Executive Office of Technology and Security Services. Digital Services is at the forefront of the state’s digital transformation. Its mission is to leverage the best technology and information available to make people’s interactions with state government fast, easy, and wicked awesome. There’s a lot of work to do, but we’re making quick progress.

In 2017, Digital Services launched the new Mass.gov. In 2018, the team rolled out the first-ever statewide web analytics platform to use data and verbatim user feedback to guide ongoing product development. Now our researchers and designers are hard at work creating a modern design system that can be reused across the state’s websites and conducting the end-to-end research projects to create user journey maps to improve service design.

If you want to work in a fast-paced agile environment, with a good work life balance, solving hard problems, working with cutting-edge technology, and making a difference in people’s lives, you should join Massachusetts Digital Services.

Check out some of our current postings here:

Digital Strategist

Digital Project Manager

Web Analytics Business Analyst

Didn’t see a good fit for you? Check out more about hiring at the Executive Office of Technology and Security Services and submit your resume in order to be informed on roles as they become available.

Coming soon…

Senior Drupal Developer

Director of Technology

Creative Director

Senior UI/UX Designer

https://medium.com/media/22630d8c2d462af2cdd2ec5109f6e2b5/href

Join our growing team at Massachusetts Digital Services was originally published in MA Digital Services on Medium, where people are continuing the conversation by highlighting and responding to this story.

Categories: Drupal

OpenSense Labs: Drupal as a part of Content as a Service Strategy

Planet Drupal - 19 October 2018 - 8:39am
Drupal as a part of Content as a Service Strategy Shankar Fri, 10/19/2018 - 21:09

Digitisation has altered the game for content providers. Customers - whether businesses or consumers - look for bite-sized pieces of content delivered to their chosen interface anywhere and anytime. Content creators continuously need to rethink and rewire how they disseminate content across channels due to the proliferation of digital platforms, the variety, and granularity of media, and the ever-shorter attention spans of customers. And so arises the need for a Content as a Service (CaaS) solution.


The democratisation of content and the entry of social media and the technology giants into the content business are erasing the divide between media and entertainment market segments. This is building a new ecosystem that will be driven by content-as-a-service delivery models. Drupal can offer a magnificent CaaS solution for the organisations looking to distribute content on screens, websites, mobile apps, IoT devices and beyond.

A Peek at CaaS Source: Bloomreach

CaaS is an architectural pattern that completely decouples the content authoring process from how it is used. Traditional CMS offers a single software to separate the data layer from the presentation of said data. Even though the presentation of the data is separated, it is still attached to the technology, delivery channels, and the capabilities supported by the software. CaaS comprises of a backend CMS that provides content authoring capabilities with APIs for delivering content to external systems.

CaaS is an architectural pattern that completely decouples the content authoring process from how it is used.

An efficacious content-as-a-service model enables enterprises to store content in a form and with the sort of detail which makes it easier to discover, repurpose, transform, and transmit. Today, service providers can leverage their application programming interfaces (APIs) as platforms for disseminating content.

Simultaneously, organisations must consider the level of granularity that is needed to store and expose units of content in the most effective manner. They should track the business costs generated by individual units of content so that their content supply can be refined and new business models can be developed. Even though technology constraints must be duly assessed, content providers should understand their content’s ‘lowest common monetisation denominator’ (LCMD) and the returns on content assets.

Executing content as a service

CaaS is a paradigm for delivering the right amount of content to the right kind of customer at the right time via the right channel. That is:

  • Content is enough to meet the demands of the customers
  • Content is personalised
  • Content is delivered accurately when the customer needs it. Updates are done in real-time.
  • Content is delivered on the platform of choice at the right time and then swiftly and endlessly transferred from one platform/ device to another.

A perfect CaaS model is integrated with numerous services that connect to a customer-facing platform and expose units of content on demand. These can constitute music on Apple Music, books and magazines on Amazon Kindle, or shows on Netflix. The ubiquitous nature of the IoT is expected to make CaaS indispensable as all types of data are gathered by big data platforms and made available to application developers.

APIs are the drivers for most “X-as-a-service” ecosystems and content-as-a-service is no exception to this Source: Bloomreach

With the increase in platforms, formats, devices, languages and locations for exposing content, the ease, speed, and efficacy of governing and delivering it must also increase. APIs can transmit data to and from any destination faster and with cost-effective ways. In the API economy, APIs are developed like products for supporting new business models. An API strategy is a collaborative effort among product and technology teams to keep a digital business strategy on track. APIs are the drivers for most “X-as-a-service” ecosystems and content-as-a-service is no exception to this.

The value of CaaS Source: Cognizant

The ability to precisely identify the smallest unit of content that can be stored autonomously and delivered profitably is the foundation of any CaaS model. This can be referred to as the lowest common monetisable denominator (LCMD) of content which can be tracked, tagged and reused. Through taxonomy and semantics, enterprises can store content at the LCMD level and develop an aggregate or smaller levels of the data on demand.

So once the organisation identifies the LCMD of content the evaluation can be done on the returns from pieces of content created at that granularity, that is, returns on a content asset (RoCA).

When can you use CaaS?

Following are the scenarios where you can utilise the capabilities of CaaS:

  • Mobile applications: Alterations to mobile applications, most often than not, needs the application to be resubmitted to a digital distribution platform vendor like Google or Apple for the approval. CaaS system enables businesses to alter the content in these applications without having to change the application.
  • Multiple channels: CaaS enables business users to deploy the same content to several delivery channels via a singular system rather than having to maintain different systems for different channels.
  • UX flexibility: Being independent of the presentation layer, designers can freely use any technology to develop their UX and are not tied to technologies or components supported by the CMS. Javascript frameworks, that evolve at their own pace, provides developers with greater UX flexibility.
  • AI-based application: Leveraging chatbots and other AI-based applications, it is easier for robots to consume content via an API.
Drupal as Content as a Service Source: Dries Buytaert’s blog

If you want to enable your frontend developers to create engrossing customer experiences, Drupal’s content-as-a-service approach allows you to think outside the page-based mentality. Drupal’s CaaS solution helps in delivering reusable, future-proof content seamlessly by decoupling the back and front ends where needed.

Moreover, frontend developers can develop better experiences with Drupal’s presentation-neutral content and RESTful API and leverage tools like Angular, Ember, Backbone and many more. Ingestion of content from third-party content, for example, from aggregators and syndicators, to bring content into your Drupal environment can be done which can be disseminated to any channel. With Drupal’s CaaS capability, content is easily consumed by other websites and application that you choose.

It has all been possible because of the amazing work that is going on in the Drupal Community’s API-first initiative. It is actively working to advance existing and new web services web services efforts thereby making Drupal an excellent CaaS and optimal for developers. Through web services like JSON API and GraphQL or the tooling that accelerates headless application development like the Waterwheel ecosystem, Drupal as a content-as-a-service is great for developers.

Drupal is stupendous for both editors and developers

Drupal is stupendous for both editors and developers. The biggest advantage that Drupal has over its headless competitors is that it can be an amazing CMS for content editors to give them control over the presentation of their content and a rich headless CMS for enabling developers in building huge content ecosystems in a single package.
 
With Drupal perpetually powering more and more websites, it is also being extracted to its full potential in order to serve content to other backend systems, native applications, single page applications, and even conversational interfaces simultaneously.

Conclusion

As digital transformation accelerates, content providers are altering the nuts and bolts of their content activities. As more content is delivered as a service through a myriad of APIs, more data will get generated thereby assisting content providers in creating more precise business models.
 
Content as a service is like a treat for the developers giving them maximum flexibility in their pursuits of digital innovation. Drupal as a CaaS has been offering a great digital experience to both content editors and developers alike.
 
Drupal experts at Opensense Labs have been powering digital transformation of businesses through Drupal development.
 
Contact us at hello@opensenselabs.com to build great digital experiences using Drupal as Content as a Service.
 

blog banner blog image CaaS Content as a Service Drupal CaaS Drupal Content as a Service Drupal Drupal 8 Drupal CMS API Web API API-first API-first Drupal Decoupled Drupal Headless Drupal Decoupled CMS Headless CMS Blog Type Articles Is it a good read ? On
Categories: Drupal

Acquia Developer Center Blog: Decoupling in Drupal, all the questions you had, answered by internet

Planet Drupal - 19 October 2018 - 8:30am

Question: Decoupling Drupal… Wait, what? why? when?

 

In a few words/points, decouple is good because:

  • Unleash of cutting edge frontend technologies
  • frontend technologies which are constantly accelerating and with which CMS’es can’t keep pace
  • Lots of front end work that does not necessarily need to change when upgrading the CMS
  • Which means also less friction between frontend and backend

 

Question: What is all this hype about

 

Tags: acquia drupal planet
Categories: Drupal

Interactive widget for Recurring Dates Field

New Drupal Modules - 19 October 2018 - 7:09am

Interactive widget forked from Recurring Dates Field.

Categories: Drupal

mark.ie: Can I Stop PatternLab Variants from Inheriting Data from their Parent Component

Planet Drupal - 19 October 2018 - 5:01am
Can I Stop PatternLab Variants from Inheriting Data from their Parent Component

I have a card component with a title, image, text, and link. How come all my card variants are inheriting all the values from the default one? Short answer, you don't. It's a feature, not a bug.

markconroy Fri, 10/19/2018 - 13:01

Where this really becomes frustrating is when you have a pattern that lists a number of items in an array. In that case, all variants will have (at least) that many items, even though you may want fewer.

For illustration:

list.twig has something like this:

{% for list_item in list_items %}
  {{ list_item }}
{% endfor %}

Then list.yml has something like this:

list_items:
  - join():
    - include():
        pattern: content-teaser
  - join():
    - include():
        pattern: content-teaser
  - join():
    - include():
        pattern: content-teaser
  - join():
    - include():
        pattern: content-teaser
  - join():
    - include():
        pattern: content-teaser
  - join():
    -- loads of more teasers for the main listing page

Now you want to create a variant of list such as list~related-articles, but with only 2 items. You'd expect this would work
list_items:
  - join():
    - include():
        pattern: content-teaser
  - join():
    - include():
        pattern: content-teaser

But, no. This will still render as many items as were in the parent component. That's the beauty (a feature, not a bug) of PatternLab's inheritance system. To stop it you need to do something like this:

list_items:
  - join():
    - include():
        pattern: content-teaser
  - join():
    - include():
        pattern: content-teaser
  -
  -
  - and so on, so each extra one is basically set to 'false'

When we do this with a component such as a card, we might also want to have variants such as card~no-image, card~no-text, etc. In this case, we'd have a card.yml like so:

card_title: 'My Card Title'
card_image: ''
card_text: 'The text of the card will go here'

However, if we create variants, each of the items in card will be inherited to the variant. You'll notice this if you try to create one super mega component for all variants of a hero component for example (hero title, pre-title, sub-title, image, alignment, cta buttons, etc).

In this case, what I do is create a default component card.yml or hero.yml and give it only values for items that will more than likely be in all variants (basically whatever you are going to mark as a required field in Drupal (or whatever CMS you are using)), then set all others to 'false' in the component. Now when I create variants I only need to override the specifics for that variant, since everything else that is being inherited is already set to false. I also create a 'Kitchen Sink' version of the component which shows every item in action but DO NOT create this as the default/reference component.

My default card.yml might look like this:

card_title: 'My Card Title'
card_image: false
card_text: false

Now my variants can look as simple as:

card~with-image.yml
card_image: ''

And card~long-title will be just one line:

card_title: 'This is a long title on a card just to illustrate what happens when it wraps to more than one line'

And that is why this is a feature, not a bug - it allows us to write variants very simply and quickly. Is there a better way of doing this? I'm not aware of one. If you are, drop it in the comments. Thanks.

Categories: Drupal

Matt Glaman: Running Drupal's Nightwatch test suite on DDEV

Planet Drupal - 18 October 2018 - 7:29pm
Running Drupal's Nightwatch test suite on DDEV Thursday 18, October 2018 mglaman

This is the third, and final post in my series on running Drupal’s various test suites using the DDEV local development stack. Previously I covered running Drupal’s Unit, Kernel, and Functional tests and then running Chromedriver to execute the FunctionalJavascript test suite. In this post, I will talk about running the newly introduced Nightwatch.js test framework.

Categories: Drupal

Redesigning a website using CSS Grid and Flexbox

Dries Buytaert - 18 October 2018 - 3:53pm

For the last 15 years, I've been using floats for laying out a web pages on dri.es. This approach to layout involves a lot of trial and error, including hours of fiddling with widths, max-widths, margins, absolute positioning, and the occasional calc() function.

I recently decided it was time to redesign my site, and decided to go all-in on CSS Grid and Flexbox. I had never used them before but was surprised by how easy they were to use. After all these years, we finally have a good CSS layout system that eliminates all the trial-and-error.

I don't usually post tutorials on my blog, but decided to make an exception.

What is our basic design?

The overall layout of the homepage for dri.es is shown below. The page consists of two sections: a header and a main content area. For the header, I use CSS Flexbox to position the site name next to the navigation. For the main content area, I use CSS Grid Layout to lay out the article across 7 columns.

Creating a basic responsive header with Flexbox

Flexbox stands for the Flexible Box Module and allows you to manage "one-dimensional layouts". Let me further explain that by using an real example.

Defining a flex container

First, we define a simple page header in HTML:

Site title Navigation

To turn this in to a Flexbox layout, simply give the container the following CSS property:

#header { display: flex; }

By setting the display property to flex, the #header element becomes a flex container, and its direct children become flex items.

Setting the flex container's flow

The flex container can now determine how the items are laid out:

#header { display: flex; flex-direction: row; }

flex-direction: row; will place all the elements in a single row:

And flex-direction: column; will place all the elements in a single column:

This is what we mean with a "one-dimensional layout". We can lay things out horizontally (row) or vertically (column), but not both at the same time.

Aligning a flex item #header { display: flex; flex-direction: row; justify-content: space-between; }

Finally, the justify-content property is used to horizontally align or distribute the Flexbox items in their flex container. Different values exist but justify-content: space-between will maximize the space between the site name and navigation. Different values exist such as flex-start, space-between, center, and more.

Making a Flexbox container responsive

Thanks to Flexbox, making the navigation responsive is easy. We can change the flow of the items in the container using only a single line of CSS. To make the items flow differently, all we need to do is change or overwrite the flex-direction property.

To stack the navigation below the site name on a smaller device, simply change the direction of the flex container using a media query:

@media all and (max-width: 900px) { #header { flex-direction: column; } }

On devices that are less than 900 pixels wide, the menu will be rendered as follows:

Flexbox make it really easy to build responsive layouts. I hope you can see why I prefer using it over floats.

Laying out articles with CSS Grid

Flexbox deals with layouts in one dimension at the time ― either as a row or as a column. This is in contrast to CSS Grid Layout, which allows you to use rows and columns at the same time. In this next section, I'll explain how I use CSS Grid to make the layout of my articles more interesting.

For our example, we'll use the following HTML code:

Lorem ipsum dolor sit amet

Sed ut perspiciatis unde omnis iste natus error sit voluptatem accusantium doloremque laudantium.

Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.

Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur.

Sed ut perspiciatis unde omnis iste natus error sit voluptatem accusantium doloremque laudantium, totam rem aperiam, eaque ipsa quae ab illo inventore veritatis et quasi architecto beatae vitae dicta sunt explicabo. Nemo enim ipsam voluptatem quia voluptas sit aspernatur aut odit aut fugit, sed quia consequuntur magni dolores eos qui ratione voluptatem sequi nesciunt.

Some meta data Some meta data Some meta data

Simply put, CSS Grid Layout allows you to define columns and rows. Those columns and rows make up a grid, much like an Excel spreadsheet or an HTML table. Elements can be placed onto the grid. You can place an element in a specific cell, or an element can span multiple cells across different rows and different columns.

We apply a grid layout to the entire article and give it 7 columns:

article { display: grid; grid-template-columns: 1fr 200px 10px minmax(320px, 640px) 10px 200px 1fr; }

The first statement, display: grid, sets the article to be a grid container.

The second statement grid-template-columns defines the different columns in our grid. In our example, we define a grid with seven columns. The middle column is defined as minmax(320px, 640px), and will hold the main content of the article. minmax(320px, 640px) means that the column can stretch from 320 pixels to 640 pixels, which helps to make it responsive.

On each side of the main content section there are three columns. Column 3 and column 5 provide a 10 pixel padding. Column 2 and columns 6 are defined to be 200 pixels wide and can be used for metadata or for allowing an image to extend beyond the width of the main content.

The outer columns are defined as 1fr, and act as margins as well. 1fr stands for fraction or fractional unit. The width of the factional units is computed by the browser. The browser will take the space that is left after what is taken by the fixed-width columns and divide it by the number of fractional units. In this case we defined two fractional units, one for each of the two outer columns. The two outer columns will be equal in size and make sure that the article is centered on the page. If the browser is 1440 pixels wide, the fixed columns will take up 1020 pixels (640 + 10 + 10 + 180 + 180). This means there is 420 pixels left (1440 - 1020). Because we defined two fractional units, column 1 and column 2 should be 210 pixels wide each (420 divided by 2).

While we have to explicitly declare the columns, we don't have to define the rows. The CSS Grid Layout system will automatically create a row for each direct sibling of our grid container article.

Now we have the grid defined, we have to assign content elements to their location in the grid. By default, the CSS Grid Layout system has a flow model; it will automatically assign content to the next open grid cell. Most likely, you'll want to explicitly define where the content goes:

article > * { grid-column: 4 / -4; }

The code snippet above makes sure that all elements that are a direct sibling of article start at the 4th column line of the grid and end at the 4th column line from the end. To understand that syntax, I have to explain you the concept of column lines or grid lines:

By using grid-column: 4 / -4, all elements will be displayed in the "main column" between column line 4 and -4.

However, we want to overwrite that default for some of the content elements. For example, we might want to show metadata next to the content or we might want images to be wider. This is where CSS Grid Layout really shines. To make our image take up the entire width we'll just tell it span from the first to the last column line:

article > figure { grid-column: 1 / -1; }

To put the metadata left from the main content, we write:

#main article > footer { grid-column: 2 / 3; grid-row: 2 / 4; }

I hope you enjoyed reading this tutorial and that you are encouraged to give Flexbox and Grid Layouts a try in your next project.

Categories: Drupal

Scheduled Transitions

New Drupal Modules - 18 October 2018 - 5:09am

In progress.

Aims to provide an alternative to Scheduled Updates and similar projects.

Users may select a specific revision, and it will be published at a specified date.

Categories: Drupal

ComputerMinds.co.uk: Quickly update Drupal core

Planet Drupal - 18 October 2018 - 4:17am

If you've got a Drupal site, which you need to update quickly (for example, to address last night's security advisory!), here's a tip. Run this from the command line:

curl 'https://github.com/drupal/drupal/compare/7.59..7.60.patch' | patch -p1

This assumes your codebase was on Drupal 7.59 and you're currently in Drupal's root directory. If you're currently on a different version, adjust the numbers in the patch URL accordingly.

Don't forget to still run database updates via /update.php or drush updatedb !

The Drupal repo on github is a verbatim mirror of the official Drupal repo from git.drupal.org. Github supports comparing arbitrary git references, with the /ORGANIZATION/REPO/compare/GITREF..GITREF URL, where the reference can be a tag, branch or revision. Adding '.patch' to the end of a github URL formats the page as a patch. So I've made use of these three things to give me an exact patch of the changes needed to update Drupal core's code.

We normally use Composer (especially for Drupal 8) or Drush make to manage our codebases, including core, which is definitely the ideal, but sometimes projects aren't organised this way for whatever reason. A simple patch like this avoids the need for drush, or even potential mistakes that can be made when running drush pm-updatecode (such as removing any customisations within core directories).

This method is even compatible with any core patches you already have in place, which normally have to be to re-applied when upgrading core by other methods. If you have any existing changes to core that are incompatible, you'll get errors about not being able to apply anyway, which you can then resolve manually.
(Any patches/hacks you make to core should be documented clearly somewhere, so drush make or composer-patches would be better in that scenario though!)

You can use this method to patch from github even if your core codebase is not in version control. But if it is... always check your diffs before committing! :-)

Categories: Drupal

OpenAM API

New Drupal Modules - 18 October 2018 - 3:22am

Module provide Drupal 8 integration with OpenAM REST API

Categories: Drupal

Devel PHP

New Drupal Modules - 18 October 2018 - 2:03am

The Execute feature has been removed from the Devel module for Drupal 8 since version 1.3. This module re-adds back that
feature as an external module.

Just enable devel_php as any other module and go to /devel/php to use it, or add the Execute PHP widget to the Devel
Toolbar (/admin/config/development/devel/toolbar).

Categories: Drupal

Safari 12 JS fix

New Drupal Modules - 18 October 2018 - 1:58am

This simple module provides a fix for famous JS Array.reverse() bug found in WebKit used in release version of Safari 12.
The module simply inserts a polyfill to every page of your website.

Usage

Simply install and enable the module. The fix will only apply to affected Safari versions.

Categories: Drupal

Tarteaucitron.js Cookie Manager #gdpr

New Drupal Modules - 18 October 2018 - 1:03am

Cookie Manager for GDPR

Categories: Drupal

Webform Query

New Drupal Modules - 17 October 2018 - 10:05pm

Query Webform Submission Data

The Webform module stores all submission data in the one table using the EAV model. This is great for performance but it can be tricky to extract submission data matching certain criteria.

Categories: Drupal

Pages

Subscribe to As If Productions aggregator - Drupal