Feed aggregator

Aram Boyajyan: Custom permissions in Drupal 8

Planet Drupal - Sat, 17/09/2016 - 14:31
Custom permissions in Drupal 8 Sat, 17/09/2016 - 14:31

Drupal's permissions system is at the same time easy to use and very powerful. It covers most of the cases where your module provides different functionality for various roles on the site.

In both versions of Drupal this is fairly straightforward to implement through code. There are two parts to this article: defining custom permissions (both static and dynamic), and performing checks to see if the current user has access to them.

Categories: Elsewhere

TimOnWeb.com: How To Force Search API To Reindex a Node / an Entity

Planet Drupal - Sat, 17/09/2016 - 14:26

By default Search API (Drupal 7) reindexes a node when the node gets updated. But what if you want to reindex a node / an entity on demand or via some other hook i.e. outside of update cycle? Turned out it is a quite simple exercise. You just need to ...

Read now

Categories: Elsewhere

Dave Hall Consulting: The Road to DrupalCon Dublin

Planet Drupal - Sat, 17/09/2016 - 12:26

DrupalCon Dublin is just around the corner. Earlier today I started my journey to Dublin. This week I'll be in Mumbai for some work meetings before heading to Dublin.

On Tuesday 27 September at 1pm I will be presenting my session Let the Machines do the Work. This lighthearted presentation provides some practical examples of how teams can start to introduce automation into their Drupal workflows. All of the code used in the examples will be available after my session. You'll need to attend my talk to get the link.

As part of my preparation for Dublin I've been road testing my session. Over the last few weeks I delivered early versions of the talk to the Drupal Sydney and Drupal Melbourne meetups. Last weekend I presented the talk at Global Training Days Chennai, DrupalCamp Ghent and DrupalCamp St Louis. It was exhausting presenting three times in less than 8 hours, but it was definitely worth the effort. The 3 sessions were presented using hangouts, so they were recorded. I gained valuable feedback from attendees and became aware of some bits of my talk needed some attention.

Just as I encourage teams to iterate on their automation, I've been iterating on my presentation. Over the next week or so I will be recutting my demos and polishing the presentation. If you have a spare 40 minutes I would really appreciate it if you watch one of the session recording below and leave a comment here with any feedback.

Global Training Days Chennai DrupalCamp Ghent

Note: I recorded the audience not my slides.

DrupalCamp St Louis

Note: There was an issue with the mic in St Louis, not there is no audio from their side.

Categories: Elsewhere

Jay L.ee: Drupal Relation Module Configuration Manual

Planet Drupal - Sat, 17/09/2016 - 06:53

Today I'll show you guys how to install the Relation module for Drupal 7. Believe it or not, it took me almost five years to fully figure out how to install what I think is one of the most confusing modules ever made lol.

So what exactly does Relation do? Let's say you have a film and its sequel:

* Film 1 is followed by film 2.
* Film 2 follows film 1.

The beauty of Relation is that once you create one relation (in either direction), it creates the other one for you automatically. It's this simple thing that this module does amazingly well.

Tags: Drupal 7Drupal Planet
Categories: Elsewhere

Drupal core announcements: Drupal core security release window on Wednesday, September 21, 2016

Planet Drupal - Fri, 16/09/2016 - 23:44
Start:  2016-09-21 11:00 America/Chicago Organizers:  xjm catch David_Rothstein stefan.r Event type:  Online meeting (eg. IRC meeting)

The monthly security release window for Drupal 8 and 7 core will take place on Wednesday, September 21.

This does not mean that a Drupal core security release will necessarily take place on that date for any of the Drupal 8 or 7 branches, only that you should watch for one (and be ready to update your Drupal sites in the event that the Drupal security team decides to make a release). This is also the final security release window for Drupal 8.1.x, so Drupal 8 sites should prepare to update to Drupal 8.2.0 and test Drupal 8.2.0-r1.

There will be no bug fix or feature release on this date. The next window for a Drupal core patch (bug fix) release for all branches is Wednesday, October 05, which is also the scheduled release for Drupal 8.2.0.

Drupal 6 is end-of-life and will not receive further security releases.

For more information on Drupal core release windows, see the documentation on release timing and security releases, and the discussion that led to this policy being implemented.

Categories: Elsewhere

CU Boulder - Webcentral: Using Geolocation for More Personalized Results

Planet Drupal - Fri, 16/09/2016 - 23:19
In today's world, users are accustomed to having results personalized for them without having to do any work. If you login to your favorite store, e.g. Amazon, you'll get a list of recommended products. Google will provide you location-based searches. Your video streaming services, banking, big box stores, even your potential online dates all have incorporated location-based way-finding. Sometimes, you aren't even aware that you are being directed by location. It's simpler to just make users select their location and filter by that, but the best user experience is to attempt do this step for the user. Scenario When showing...
Categories: Elsewhere

CU Boulder - Webcentral: Drupal as a Service at CU Boulder

Planet Drupal - Fri, 16/09/2016 - 19:22
The Web Express service at CU Boulder runs over 1,000 Drupal-powered web sites and is designed, developed and maintained by a team of nine . For our team to support the service, we created a design, development and user experience strategy that allows us to support and scale the service to the campus needs. When we started with Drupal, we were eager to do any custom design and development work that was required for a project. In a short amount of time, we had a lot of custom sites on custom codebases. We learned that this was not something that...
Categories: Elsewhere

Mediacurrent: Meet Matt Davis

Planet Drupal - Fri, 16/09/2016 - 17:02

Hi Matt - thanks for letting us get to know a bit more about you! Let's get started:

1. What’s your role at Mediacurrent, both internally and client-related?

I am a Lead Drupal Architect, which means I do a lot of requirements gathering, discovery, and planning out large scale builds, and then I help lead development teams in executing those builds.

Categories: Elsewhere

OSTraining: How to Add Audio Files to Drupal 8 Sites

Planet Drupal - Fri, 16/09/2016 - 15:58

This week, an OSTraining member asked us about adding audio files to their Drupal 8 site.

Using the Drupal AudioField module, I will explain how you can display a simple HTML5 player for your site's audio files.

In order to get started, you must download, install and enable the AudioField module.

Categories: Elsewhere

OpenLucius: Module release: 'Pop-up question redirect'

Planet Drupal - Fri, 16/09/2016 - 11:54

The 'Popup question redirect' module allows Drupal site builders to show website visitors a pop-up in which a question can be asked. If the vistor clicks "Yes" they will be redirected to a given webpage.

Categories: Elsewhere

DrupalCon News: Drupal in Ireland - Project 5

Planet Drupal - Fri, 16/09/2016 - 10:00

As part of our series of showcasing what Drupal is doing in Ireland, we are happy to bring you another awesome online experience that Drupal has created.  

Project 5 - Dún Laoghaire-Rathdown County Council

Monsoon Consulting worked with Dún Laoghaire-Rathdown County Council to build the next generation of DLR websites and internal intranet platform, using Drupal 7 as the content management system. 

Categories: Elsewhere

Danny Englander: Drupal 8 Theming: How to Define Variables in Twig Templates to Use as Custom HTML Classes

Planet Drupal - Fri, 16/09/2016 - 03:06

For the past seven months, I've been designing, building, and theming with Drupal 8 for my own side project. Along the way, I've seen huge advancements in these realms versus what was possible with Drupal 7. One particular module I've been working with is Entity Construction Kit AKA "ECK".

ECK provides a way to create freestanding entities, bundles, and fields independent of traditional means via nodes, terms, users, etc... Within my project, I've implemented ECK fields that offer content editors options for layouts, colors, element padding, and so on.

Discover the array path with kint

I'll use the case of an accordion group entity that I've designed. One such field within this entity bundle is called "Slice margin." This field allows a content editor to set the top and bottom margins within a specific element by choosing values from a select list. Examining this field with kint, the value of the selected item's array path is:

$var['entity']['field_slice_margin']['0']['#markup'] Check for the field and define the variable

Now with the array path value determined, a variable in the accordion entity can be set in a Twig template:

{% if entity.field_slice_margin|render %} {% set margin_settings = 'margin__' ~ entity.field_slice_margin['0']['#markup'] %} {% endif %}

In the above code, the code checks to be sure the field is being rendered and then a variable is set for the value. In addition, margin__ is concatenated (~) as a class prefix.

Set a class using the variable

The block of code above does not do much on its own, so lets put the new variable to use in the template. For that, Drupal 8's Twig set_classes comes in handy.

{% set classes = [ 'eck', 'eck__section', eck__bundle-accordion, 'margin__default', margin_settings|clean_class, ] %}

Note in the above, the new variable is output using the Drupal Twig clean_class method, margin_settings|clean_class. clean_class cleans up any spaces and underscores in a string and converts those to standard dashes for use as a standard html class name.

Output the HTML with the classes

Now that this is done, the class can be rendered in an HTML element in the same twig template using the attributes.addClass(classes) method:

<section {{ attributes.addClass(classes) }}> <ul class="eck__collapsible collapsible popout" data-collapsible="accordion"> {{ entity.field_accordion_reference|field_value }} </ul> </section> Rendered HTML

Finally, this will render in HTML as:

<section class="eck eck__section margin__default margin__flush-above-below eck__bundle-accordion">

The key class rendered here from entity.field_slice_margin is margin__flush-above-below, that's the specific value the content editor chose from the select list on the node edit page. Now this and other values from this field can be used in theming like so using Sass:

.margin { &__default { margin-bottom: 70px; } &__flush-above { margin-top: 0; } &__flush-below { margin-bottom: 0; } &__flush-above-below { margin-top: 0; margin-bottom: 0; } } Summary

As you can see, Twig is really powerful in Drupal 8. No preprocess functions were used here which really helps streamline theming. We stayed within one Twig template for all of the functions and code above. A lot of possibilities here to give content creators more control over layout, colors, custom classes, and more.

Tags 
  • Drupal
  • Twig
  • Theming
  • Drupal Planet
  • Drupal 8
Resources 
Categories: Elsewhere

Cheeky Monkey Media: More than Websites

Planet Drupal - Thu, 15/09/2016 - 21:17
More than Websites chris Thu, 09/15/2016 - 19:17

We have established ourselves as experts in the Drupal and Web development sphere. However, few people are aware that we bring much more to the table. We are a diverse team of creative thinkers, designers, and marketers with the single-minded desire to make your project a success. It takes more than just building a Website these days, so it's important to us that our clients know that engaging with Cheeky Monkey Media can be a full spectrum experience. 

To help illustrate our hidden talents, we put together this quick little reel highlighting just some of the “Other things we do”, things like graphic design, marketing, and SEO.

Categories: Elsewhere

Annertech: Save Money: Security Updates and Web Hosting in One Simple Package

Planet Drupal - Thu, 15/09/2016 - 15:10
Save Money: Security Updates and Web Hosting in One Simple Package

Choosing proper hosting for your site shouldn't be a race to the bottom.

Hosting websites is hard. Websites themselves are complex, global traffic can mean huge numbers, big spikes in activity and always demanding users. Sites need to be served quickly, consistently and reliably. Downtime costs money, effort, and more than likely a few extra grey hairs too.

Categories: Elsewhere

Valuebound: What are you giving back to the Community?

Planet Drupal - Thu, 15/09/2016 - 12:33

The Drupal Community boasts of having more than a hundred thousand active contributors to this Open Source platform. People around the globe contribute to the codebase and more teaming up together. Businesses nowadays are staying ahead of the competition by encouraging contributions. Everything is about making together and building a better place, if you are not adding value you are already out of the league.

Why should I contribute?

You may be in one of those organizations who agree to disagree with the point above and might ask “Why should I spend my time and resources for something I don’t see value in?” Well, then my friend you should be the first ones to start volunteer contributions with whatever little…

Categories: Elsewhere

Third & Grove: Redirecting Node Pages in Drupal 8

Planet Drupal - Thu, 15/09/2016 - 11:46
Redirecting Node Pages in Drupal 8 josh Thu, 09/15/2016 - 05:46
Categories: Elsewhere

Kodamera Screencast: Exporting and importing taxonomies

Planet Drupal - Thu, 15/09/2016 - 10:28

There are many ways of exporting and importing taxonomies and terms in Drupal, but one of the more simpler ways is to use the Taxonomy CSV import/export module. It lets you choose one of many taxonomies, like the tag taxonomy for example, export it to a comma-separated list which you then can import in a similar way.

In this video I'll show you how to do an export from one Drupal installation, in this case a Drupal 6 version (just to show that it's possible to move tags between different Drupal versions as well) and then import it into another Drupal installation (Drupal 7 in this case).

It all starts with the export where you choose which vocabulary/ies you want to export and how you want to format it.

The second stage is to import the CSV-file into your target installation, and I'll show you this as well. 

The module has Drush support as well, so if you use Drush much you might want to use the terminal for your export and import.


Read more
Categories: Elsewhere

DrupalCon News: Drupal in Ireland - Project 4

Planet Drupal - Thu, 15/09/2016 - 10:00

As part of our series of showcasing what Drupal is doing in Ireland, we are happy to bring you another awesome online experience that Drupal has created.  

Project 4 - Lámh

Lámh is a manual sign systems used by children and adults with intellectual disability and communication needs in Ireland. Lámh signs are used to support communication - they act as a stepping stone to communicating with the world. 

Categories: Elsewhere

DrupalEasy: DrupalEasy Podcast 185 - Amigurumi Long Beans (Ted Bowman - D8 Outside-In)

Planet Drupal - Thu, 15/09/2016 - 08:52

Direct .mp3 file download.

Ted Bowman (tedbow) gets promoted from a lowly podcast co-host to special guest on this very special episode of the DrupalEasy Podcast. Ted has been working on the Drupal "Outside In" initiative(?), and shares his knowledge on the project. Anna Kalata and Ryan Price join Mike Anello to also discuss Drupal Association changes, new coding standards, giraffes, and manatees.

Interview DrupalEasy News Three Stories
  1. MarCom changes, and how we'll keep moving forward - blog post by Bradley Fields and Changes for the Drupal Association Events Team - blog post by Rachel Friesen.
  2. Documentation overhaul - blog post by tvn.
  3. Coding standards - blog post by Howard Tyson.
Sponsors Picks of the Week Upcoming Events Follow us on Twitter Five Questions (answers only)
  1. Paddleboarding.
  2. Dick's TSHQ.
  3. Pay for kids' college.
  4. Giraffe.
  5. First Orlando meetups.
Intro Music Subscribe

Subscribe to our podcast on iTunes, Google Play or Miro. Listen to our podcast on Stitcher.

If you'd like to leave us a voicemail, call 321-396-2340. Please keep in mind that we might play your voicemail during one of our future podcasts. Feel free to call in with suggestions, rants, questions, or corrections. If you'd rather just send us an email, please use our contact page.

Categories: Elsewhere

Unimity Solutions Drupal Blog: Video Annotations in Drupal 8

Planet Drupal - Thu, 15/09/2016 - 07:29

Our first blog Video Annotations: A Powerful and Innovative Tool for Education explained power of videos in education when combined with features like video annotation and second blog Identification of an Open Source Video Annotations Tool for NVLI listed evaluation criteria of open annotation module that assisted NVLI project. This third blog in the series will involve defining the overall architecture of the Video Annotation solution in Drupal.

Categories: Elsewhere

Pages

Subscribe to jfhovinne aggregator