emGee Software Solutions Custom Database Applications

Share this

Drupal CMS

ADCI Solutions: Cloud hosting platforms. Part two: Acquia Cloud

Drupal.org aggregator - Tue, 02/06/2018 - 19:32

Acquia Cloud is one of the modern hosting platforms that can enhance your work in a number of ways. If you consider yourself a good Drupal developer, you must know what possibilities Acquia Cloud provides.

Isolated environments, git support, extensive documentation, and even the Acquia Insight tool for website’s performance evaluation - Acquia Cloud has it all.

 

Learn more about Acquia Cloud

 

Categories: Drupal CMS

PreviousNext: New in core: a layout builder for Drupal 8.5.0

Drupal.org aggregator - Tue, 02/06/2018 - 17:14

Drupal 8.5.0 will come with a new experimental module, Layout Builder.

What is layout builder? Well its basically panelizer in core.

Watch the screencast for a quick run down of how to setup, configure and use it.

by Lee Rowlands / 7 February 2018 Tagged Drupal 8, Layouts, Blocks
Categories: Drupal CMS

DrupalCon News: Sneak peek at DrupalCon Speakers

Drupal.org aggregator - Tue, 02/06/2018 - 10:41

Our full session list will be announced on February 21 - but we just couldn’t wait to tell you about a few of the sessions that have us really excited.

Categories: Drupal CMS

Aten Design Group: Drupal 8 Views: Entity Reference Exposed Filter as a Select List

Drupal.org aggregator - Tue, 02/06/2018 - 09:18

I have two content types: Art and Artist. The first content type, Art, has an entity reference field to the second content type, Artist. I have a view named “Art” which shows all Art content with an exposed “Artist” filter that lets a user pare down their results. For example, a user might use the “Artist” filter to only show art by Cleon Peterson. By default this exposed filter will be rendered by Views as an empty text input, which is pretty much entirely useless! Users may not know of Cleon Peterson and wouldn’t know to search for him.

A much better solution would be to show the options available for this filter as a select list.

This is exactly the problem I was faced with while working on The Octopus Initiative, a soon-to-launch Drupal 8 project by the Museum of Contemporary Art Denver that allows citizens of Denver the opportunity to take art from the museum home with them.

The solution

Let’s jump into the code.  You’ll need to either create a new module or add the code below from mca_artwork.module to the .module file of an existing one.  I created a new module called “MCA Artwork” and placed it in my project’s modules/custom directory.  My file structure looks like this:

- mca_artwork - mca_artwork.info.yml - mca_artwork.module

Here’s my mca_artwork.info.yml:

name: MCA Artwork type: module description: Customizes Artwork Display core: 8.x package: Custom

And here’s the mca_artwork.module file, where the magic happens:

<?php   /** * @file * Contains mca_artwork.module. */   use Drupal\Core\Form\FormStateInterface;   /** * Implements hook_form_FORM_ID_alter(). * * Alters the artist options on artwork pages. */ function mca_artwork_form_views_exposed_form_alter(&$form, FormStateInterface $form_state, $form_id) {   // If not the view we are looking, move on if ($form['#id'] != 'views-exposed-form-the-art-block-1') { return FALSE; }   // Query nodes $storage = Drupal::getContainer()->get('entity_type.manager')->getStorage('node'); $nids = $storage->getQuery();   // Gather published artist nodes and sort by title $nids = $nids->condition('type', 'artist') ->condition('status', 1) ->sort('title') ->execute();   // If there are no nodes, move on if (!$nids) { return FALSE; }   // Start building out the options for our select list $options = []; $nodes = $storage->loadMultiple($nids);   // Push titles into select list foreach ($nodes as $node) { $options[$node->id()] = $node->getTitle(); }   // Start building out our new form element $artist_field = 'artist'; $form[$artist_field]['#type'] = 'select'; $form[$artist_field]['#multiple'] = FALSE;   // Specify the empty option for our select list $form[$artist_field]['#empty_option'] = t('Artist');   // Add the $options from above to our select list $form[$artist_field]['#options'] = $options; unset($form[$artist_field]['#size']); }

If you read through the comments in the above code, you’ll see we are essentially doing the following things:

  1. We load all published artist nodes, sorted by name
  2. We create an array of Artist names keyed by node id. These will be our select list options.
  3. We change the existing artist form input to a select list and populate it with our new options array.

It turns out this is a common UX need in Drupal 8 Views.  My comrade at Aten, John Ferris, also ran across this problem for a recently-launched Drupal 8 project he worked on for the Center for Court Innovation, a non-profit seeking to to create positive reforms in the criminal justice system.  The code snippet for The Octopus Initiative was largely adapted from his work on the Center for Court Innovation.

For the Center for Court Innovation site, the Chosen JS library was added to provide an interface for searching through a larger list of items.

In summary, the module I created for The Octopus Initiative provides a useful UX over what Drupal Views offers out-of-the-box.  If you have a larger number of items in your select list, then you may consider adding something like Chosen JS to make it easier to sort through, as was done for the Center for Court innovation.  Whatever you do, don't leave your users stranded with an empty text element!

Categories: Drupal CMS

Acro Media: Introducing the Urban Hipster (UH) Demo for Drupal Commerce 2

Drupal.org aggregator - Tue, 02/06/2018 - 08:51

Because Drupal has so many options and so much flexibility, it can be a bit intimidating to newcomers. It doesn't show you examples of what it can do, and it kind of seems to do nothing by default. We realized people needed to be shown just how cool it really is, so we built a demo site to do just that. Check it out here: http://commerce.acromedia.com

The setup

We focused on making it only with out-of-the-box stuff, restricting ourselves to the features and functionality that exist within Drupal Commerce ecosystem itself. No custom code or modifications other than normal theming. That's right: Using only what's available out there now, we came up with a pretty amazing ecommerce site, if we do say so ourselves.

One caveat: we did make a custom theme for the demo, which you'll probably want to do anyway. There are the default Drupal themes, but most people are going to want to create a custom one. But that's a relatively simple task for a front-end developer; you don't need a back-end developer as well.

All the other setup can be done through basic Drupal UI point-and-click configuration. If you're somewhat savvy with configuring Drupal, you can do it all yourself in a very short time, and produce a truly phenomenal site.

Sometimes you need some guidance

Many people wonder how it could possibly be so easy. We've been getting a lot of questions like, "How did you build this big amazing catalog?" And the truth is we didn't actually do that much. We just enabled and configured the functionality that was already available. Drupal has this great Search API (and associated modules, Solr and Facets) that lets you do a ton of search customizations for anything that's stored in Drupal (blog articles, users, products, whatever), so all you have to do is tweak the configurations and you get this amazing catalog.

It's not that hard, but it's not that intuitive either; you just need a little guidance and direction. Sometimes just seeing an example is enough to make you realize how easy it can be. And that's exactly what the demo provides. It features a checkout, tax configurations, some shipping options, and even a sample payment system. You can click around and check it out without fear of breaking things, the database resets every night.

When you go to the demo site initially, a popup is preseted with a bunch of guided tours, but you are of course free to ignore that and just play around with it yourself. We're also releasing a bunch of tutorial videos to help you. We also have a resources page that shows a lot of the different features you can check out.

Plus, all the source code for the demo, including the custom theme, is available on GitHub. Within the repo is a full database dump so you can set up the entire thing yourself locally (see the README.md). AND one of the Commerce module maintainers, Bojan Živanović, is taking some of the content and configuration from the demo and turning it into an installable demo store module.

It's seriously awesome. Check it out!

Chat with us

If you'd like a personalized tour to discuss how Drupal Commerce fits into your omnichannel solution, give us a shout. We're happy to show and tell.

Categories: Drupal CMS

Web Wash: How to Use Webform Predefined Options in Drupal 8

Drupal.org aggregator - Tue, 02/06/2018 - 05:00

Webform allows you to create powerful forms in Drupal without writing any custom code. One feature I want to show you today is predefined options.

Predefined options ease the creation of forms by offering common lists such as days, months, time zones, titles, etc...

For example, if you want to add a select list where users choose a country, instead of manually entering in all countries yourself, use the predefined one that comes with the module.

Webform comes with around 30 predefined lists which can be added to radio buttons, checkboxes, select list and menus. You can also create your own.

If you have a website that will use the same set of options on multiple forms, look at creating a predefined options list to save time.

In this tutorial, you'll learn how to create and use predefined options.

Categories: Drupal CMS

Dries Buytaert: To PESOS or to POSSE?

Drupal.org aggregator - Tue, 02/06/2018 - 01:43

Yesterday I shared that I uninstalled the Facebook application from my phone. My friend Simon Surtees was quick to text me: "I for one am pleased you have left Facebook. Less Cayman Island pictures!". Not too fast Simon. I never said that I left Facebook or that I'd stop posting on Facebook. Plus, I'll have more Cayman Islands pictures to share soon. :)

As a majority of my friends and family communicate on Facebook and Twitter, I still want to share updates on social media. However, I believe I can do it in a more thoughtful manner that allows me to take back control over my own data. There are a couple of ways I could go about that:

  • I could share my status updates and photos on a service like Facebook or Twitter and then automatically download and publish them to my website.
  • I could publish my status updates and photos on my website first, and then programmatically share them on Facebook, Twitter, etc.

The IndieWeb movement has provided two clever names for these models:

  1. PESOS or Publish Elsewhere, Syndicate (to your) Own Site is a model where publishing begins on third party services, such as Facebook, and then copies can be syndicated to your own site.
  2. POSSE or Publish (on your) Own Site, Syndicate Elsewhere is a publishing model that begins with posting content on your own site first, then syndicating out copies to third party services.


Here is the potential impact of each strategy:

PESOS POSSE Dependence A 3rd party is a required intermediary within the PESOS approach. When the 3rd party platform is down or disappears completely, publishers lose their ability to post new content or retrieve old content. No dependence, as the 3rd party service is an optional endpoint, not a required intermediary. Canonical Non-canonical: the data on the 3rd party is the original and copies on your domain may have to cite 3rd party URLs. Canonical: you have full control over URLs and host the original data. The 3rd party could cite the original URL. Quality Pulling data from 3rd parties services could reduce its quality. For example, images could be degraded or downsized. Full control over the quality of assets on your own site. Ease of use, implementation and maintenance 3rd party platforms make it really easy for users to publish content and you can still benefit from that. For example, you can easily upload images from your phone. The complexity inherent to the PESOS approach includes developing an infrastructure to curate archival copies to your own domain. The POSSE strategy can be significantly more work for the site owner, especially if you want comparable ease of use to 3rd party platforms. A higher level of technical expertise and time investment is likely required.

The goal of this analysis was to understand the pros and cons of how I can own my own content on https://dri.es. While PESOS would be much easier to implement, I decided to go with POSSE. My next step is to figure out my "POSSE plan"; how to quickly and easily share status updates on my Drupal site, how to syndicate them to 3rd party services, how to re-organize my mailing list and RSS feed, and more. If you have any experience with implementing POSSE, feel free to share your takeaways in the comments.

Categories: Drupal CMS

Valuebound: How to Implement Faceted search with Solr in Drupal 8?

Drupal.org aggregator - Mon, 02/05/2018 - 20:48

Sometimes we need to implement a search functionality that looks similar to some of the renowned e-commerce site search (like Amazon, Flipkart and so on) as per the category, types and all.  For this kind of search, Facet is a good option. So what exactly Faceted search is?

Facet is a module, in Drupal 8, that provides a facility to arrange all the search results as per the category. Basically, it is an arrangement of search results based on categories, content type on indexed terms and content type.

Why we use Facets?

There are various reasons a Facet can be used:

  • It provides a drill-down search facility.
  • It can be used with default search and Solr as well.
  • It shows a number of item count for each…
Categories: Drupal CMS

Roy Scholten: Core strengths

Drupal.org aggregator - Mon, 02/05/2018 - 15:28
06 Feb 2018 Core strengths

The Designing Connected Content book has arrived. “Plan and model digital products for today and tomorrow.” I have yet to dive in but I see Drupal screenshots and lists of field types like entity reference, long text (formatted), boolean, number (float), etc.

Today a content strategist collegue asked me about that list builder thing in Drupal. Show items of type x, filtered by y, sorted by x and only show fields 1, 3 and 6 of each item. And is it available for Drupal 8 as well?

Yes, that’s 1. Field UI and 2. Views module, which are both part of the Drupal core package.

We take Drupal core features for granted that other systems are still struggling with. They are also features people struggle with in Drupal because of hard to use user interfaces. I would love to see research and design work happen around how we can improve Field UI and Views UI.

Tags book designing connected content drupalplanet content modeling
Categories: Drupal CMS

aleksip.net: Using Pattern Lab in Drupal 7 theme development

Drupal.org aggregator - Mon, 02/05/2018 - 10:09
After working almost exclusively with the latest and greatest version of Drupal since 2015, I am now facing some Drupal 7 projects. I didn’t want to give up using atomic design and Pattern Lab, so I decided to create a .tpl.php PatternEngine for Pattern Lab.
Categories: Drupal CMS

Ixis.co.uk - Thoughts: Last Month in Drupal - January 2018

Drupal.org aggregator - Mon, 02/05/2018 - 03:00
Finally, after what felt like months, January has come to an end. This means it is time for our monthly blog series, Last Month in Drupal. January has seen a plethora of Drupal news and here we pick out the best bits just for you.
Categories: Drupal CMS

Hook 42: Flip Flops and Drupal: Increasing Accessibility and Building Community

Drupal.org aggregator - Sun, 02/04/2018 - 11:36

We’re stretching our legs, shaking off the snow, and heading to our first camp of 2018! AmyJune and Carie are on their way to Florida Drupal Camp to share their knowledge in "The Theme Park Capital of the World". They’re thrilled to have the opportunity to collaborate and learn with their peers.

Along with their sessions, they'll be helping with the Sunday Contribution Sprints!

Categories: Drupal CMS

DrupalEasy: Drupal 8 Development on Windows - Best Practices?

Drupal.org aggregator - Sat, 02/03/2018 - 11:34

Over the past several weeks, I've been working with three of the more well-known Docker-based local development environments that involve a Drupal focus: Docksal, DDEV, and Lando. The goal is to not only to figure out which one I prefer, but also to figure out which our two long-form online Drupal training classes should potentially standardize on.

Our classes are often comprised of folks from all different technical backgrounds, so it is important that we not only teach them tools that Drupal professionals use, but also something that folks of myriad of skill levels can easily consume. Perhaps most importantly, while the majority of our students are on Mac OS X, we still have a consistent number of students using Windows, so any solution we recommend should work similarly on all platforms.

As a Mac OS X user myself, it is important to me that I can instruct our Windows-based students without having to resort to a separate set of instructions. To that end, I have an actual Windows 10 Pro machine (not a virtual machine) that I've been using to evaluate these local development environment options. 

I've decided to focus on DDEV, Lando, and Docksal because I really like the idea of Docker-based containers; being able to customize your local development environments to each project has too many advantages to ignore. Also, as one of our classes is Pantheon-focused, Lando's Pantheon integration is a very important differentiator. 

Requirements

I have a basic set of requirements that a local development environment should be able to handle. These requirements are probably focused more on our introductory Drupal Career Online course, but I'd like to be able to recommend the same solution for any of our courses.

  • Run Composer commands (including create-project). It doesn't matter to me if this command is run on the local OS or in a container, as long as it works with a minimum of fuss. The "create-project" command can be a bit tricky on Windows - keep reading to find out why.
  • Run Git commands both on the local OS and in the container. 
  • Be able to get up-and-running with a minimum of downloads. On Mac OS X this isn't much of an issue with Terminal, Git, and PHP preinstalled, but on Windows it is a different story.
  • Be able to get up-and-running with a minimum of "extra" configuration. Granted, once you're comfortable on the command line adding something to your local PATH isn't a big deal, but for folks new-ish to the command line, it can be a significant hurdle. 
  • Have a Linux-based command line interface (to use commands like cd, ls, cat, etc...)
  • Be able to easily (zero configuration) edit text files on the command line (nano or pico).
  • Be able to modify file permissions and ownership from the command line (chown and chmod).
  • Be able to run Drush, Drupal Console, and all of the other Drupal-y things that a professional developer should have.

I am very cognizant that my requirements are probably represent the lower-end of the Drupal skill-level spectrum, but I feel these requirements are a reasonable starting point.

Potential solution

Over the past few weeks, I think I've installed, uninstalled, and reinstalled various combinations of Lando, Docksal, and DDEV as well as various command line shells (Babun, Cmder, PuTTY, Cygwin) and the Windows Subsystem for Linux at least a dozen times on my Windows machine. All this in an effort to figure out what is the best combination of tools to satisfy the requirements. At the current moment, I'm circling around recommending Lando and Cmder on Windows (Lando requires Windows 10 Pro with Hyper-V enabled) - both are easily installed with no extra configuration necessary to get almost everything working. 

Upsides

With just Lando and Cmder installed almost all of the requirements are met. I can use Git to clone a site down to my local, get it up and running in Lando and get to work.

Downsides

One minor issue is that Cmder doesn't come with nano nor pico for editing text files from the command line. It does come with vim, however (which we all know has a steeper learning curve). I can probably mitigate this issue with a little bit of config to have students run a command to open text files in something like Notepad++ or teach some basic vim commands.

The other issue is a bit more serious. With only Lando and Cmder installed, there's no way to run "composer create-project". While Lando makes Composer available in the container, developers don't normally create the containers until they have a code base. This is a bit of a chicken-and-egg issue:

  1. We need Composer to get the new code base.
  2. We need the Lando container to be up-and-running to get Composer.
  3. We need a code base before we start Lando.
  4. (return to step 1 above)

So, I think I know what you're thinking: just install Composer. Well, this isn't as simple as it sounds, as Composer requires PHP, and as far as I can tell, installing PHP on a Windows machine isn't super-straight-forward. Granted, if the developer already has another AMP stack on their Windows machine, the Composer install can be configured to use the php.exe installed with it. 

Docksal actually has a command that allows a developer to run Composer without actually having a set of containers already initialized for the project using the "fin run-cli" command. This utilizes a standalone cli container and completely removes the need to install Composer on the local OS. 

Next steps

So, where does that leave us? I'm not 100% sure, but I wanted to put this out there and get some feedback. Are you a professional Drupal developer that uses Windows as your main OS? If so, what's your setup? Am I missing anything? 

While I often try to steer new Drupal developers towards Mac OS X or Linux, sometimes it is not possible due to corporate policies or even just personal preference. I'd love to be able to teach a solution that provides a professional-level Drupal developer experience to Windows users.

Categories: Drupal CMS

Drupal Association blog: Drupal User Research - Call for Interviews

Drupal.org aggregator - Sat, 02/03/2018 - 07:46

The Drupal Association is mapping Drupal’s customer lifecycle and defining the personas who have decision making authority throughout the adoption and user journeys. Our goal is to understand how to better serve each persona at DrupalCon and on Drupal.org, in turn growing Drupal adoption and more effectively helping those working on or with Drupal to become power users

To start this project, we need to interview different types of people working with Drupal.

Will you donate 45 minutes of your time to participate in a user research call?

We are looking for people in the following job functions who work with Drupal.

Job Functions:

  • CEO
  • CMO, VP marketing
  • CTO/CIO/ Director of engineering
  • Chief Information Marketing Office
  • Chief / Lead / Tech architect
  • Developer
  • Project manager
  • Marketing technologist
  • Content strategist
  • Content author / Content editor
  • Trainers of content editors
  • UX designer
  • Customer experience manager
  • Marketing campaign manager/director
  • Purchaser/procurement
If you are interested in participating in a user research call, please sign up here by February 16, 2018 and we will contact you.
Categories: Drupal CMS

Pages