The sneakiest form of literary subtlety, in a corrupt society, is to speak the plain truth. The critics will not understand you, the public will not believe you, your fellow writers will shake their heads.
Part 3 of a series investigating what options you have with your Drupal 6 site as EOL approaches. We discuss what your options really are given the many difficult decisions you are likely faced given your organization's budget, level of risk and tolerance for it, and other business priorities. Continue reading…
In the last Paragraphs tutorial, you were introduced to the module and we created a basic paragraph type called Content. We only skimmed the surface of what the module can really do. To utilize Paragraphs to its full potential you need to learn how to create a container paragraph type and nest paragraph items.
The concept of a container is fairly simple. It's a paragraph type that has its own paragraph field on it and allows a user to nest paragraph items.
In this tutorial, we'll create a container paragraph called Banner, it'll have two fields: image and paragraphs.
When a banner paragraph is created and an image is uploaded, the image will be displayed as a background style. Now, I do understand there're multiple ways of doing this, but for simplicity we'll set it using a background style on the paragraph element.
All nested paragraphs will be rendered inside the container and displayed with the background. If you want to add any other settings, i.e., parallax configuration, you would place it on the container paragraph.
Image Whirlpool provides the user the flexibility to present their images
in a more attractive and modern way in front of the users.
It just modifies the views of the images in form of a 3d whirlpool which the user can hover upon to have a nice view of the images.
There is no restriction on the number and types of images used.
Note: Images should have minimum dimensions of 180 pixelsx150 pixels.
Drupal Console is software which allows you to alter your Drupal installation through the command line. According to the official website, “The Drupal Console is a CLI tool to generate boilerplate code, interact and debug Drupal 8.” Unlike Drush, Drupal Console is specifically for Drupal 8, the latest major release. Although Drupal Console and Drush … Continue reading "Drupal Console: Generate Module & Theme Code"
Modules Unraveled: Install Drush 7 and 8 Side-by-Side and Automatically Switch Versions Based on Each Project
Have you started working with Drupal 8 yet? If so, you might have noticed that Drush 7 doesn't play nice with Drupal 8. And if you install Drush 8, that won't work with your Drupal 7 sites. Yikes!
Have no fear!
Here's how to install BOTH Drush 7 and Drush 8 AND have each project automatically use the version that corresponds to that install. It's stinkin' awesome!Uninstall existing Drush instances
Okay, the first thing you'll want to do is uninstall every version of Drush that you already have installed. This process varies depending on how you installed it, but for example, if you installed with homebrew, the command would be something like brew remove --force drush.Install Composer
We're going to install multiple versions of Drush using Composer, so we need to make sure you have that installed first. Detailed instructions on how to install Composer globally are on their website, but here's the gist.curl -sS https://getcomposer.org/installer | php
mv composer.phar /usr/local/bin/composer
Note: If this fails due to permissions, run the mv line again with sudo. You may also have to create the /usr/local/bin directory first, depending on your existing system.
- To confirm composer was successfully installed, type composer --version and you should see something like "Composer version 1.0-dev (...) 2016-01-20 11:17:40"
Okay, let's install Drush 8!cd /usr/local/bin
composer require drush/drush:8.0.x-dev
ln -s /usr/local/bin/drush-8/vendor/bin/drush /usr/local/bin/drush8
- The "composer require..." line will download the latest dev release, you could replace "8.0.x-dev" with "8.0.2", for example, to download that specific version.
- The "ln -s..." line creates a "symbolic link" called "drush8" in the /usr/local/bin directory to the location where Drush 8 is installed. This means that we can call it from anywhere on the system by typing "drush8 --version", for example.
Easy!Install Drush 7
Now, we'll install Drush 7!cd /usr/local/bin
composer require drush/drush:7.x-dev
ln -s /usr/local/bin/drush-7/vendor/bin/drush /usr/local/bin/drush7
- The "composer require..." line will download the latest dev release, you could replace "7.x-dev" with "7.1.0", for example, to download that specific version.
- The "ln -s..." line creates a "symbolic link" called "drush7" in the /usr/local/bin directory to the location where Drush 7 is installed. This means that we can call it from anywhere on the system by typing "drush7 --version", for example.
Now, if you're already used to typing something like "drush --version" (without the specific version number), remembering to use it can be a little cumbersome, so now, we're going to create a little shell script that will automatically use the correct one for each project based on a git config variable that we set.cd /usr/local/bin
- Press the "i" key to enter "insert" mode
- Paste the following
version=$(git config --get drush.version)
if [ "$version" = '7' ];
- Press "esc", then type ":wq" and press "enter" to save and quit this file
- Type chmod +x drush (This makes the "drush" script we just created executable.)
Now, when we type a command like "drush --version" it will use Drush 8 by default. In order to use Drush 7, we need to set a configuration variable in the git repo of the project that should use it.Set Drush 7 as the Required Version for a Project cd /path/to/project
git config drush.version 7
- The first time you run "drush --version" it should return something like "Drush Version : 8.0.0-rc3" showing that you're using Drush 8
- The "git config..." line declares that you want to use Drush 7 for this project
- The second time you run "drush --version" It should show somethign like "Drush Version : 7.1.0". If so, you're all set!
You might want/need to close and re-open all terminal windows to make sure it takes effect.
If you have any questions about, or issues with, this setup, let me know in the comments!Tags: DrushDrupal 7Drupal 8Command Lineplanet-drupal
In previous article we have seen how to declare the data accessible in a custom view in MyModule.
Now that the data from our tables mymodule_tb (and mymodule_tb_2) are available, let's create the list view.
First navigate to "/admin/structure/views/add" and create the view by entering basic information as per the example below.
After "save" you are redirected to "Edit" form where further settings will be set.1) Add fields from you source table
From this form, select the fields to display. We will select 2 here "name" and "type" (refer to the table structure declared in MyModule_views_data())
Three years ago, I ended 2012 with a call to the Drupal community to Get Off the Island. Mainly I wanted to encourage Drupal developers to prepare themselves for the major changes coming in Drupal 8 by connecting with other PHP projects and with the broader community, and called on people to attend non-Drupal conferences in order to visit and learn from other communities.
We are often challenged with the maintenance of existing projects that were developed by other agencies, or a new developer arrives and we need to quickly bring them on board. The complexity of legacy projects can be very high and the risk of breaking existing logic is something we want to avoid.
One way we like to look at a project before diving into the code is through its data structure. The different entities and their relations can tell us a lot about the business logic of the site and its internal logic. We assumed that if we could easily generate a graph with all the bundles, entities, and their relations this complex task would be easier.
Having done this for a while now, I believe our assumption was right. Taking our open-source Productivity project (Gizra's internal ERP/Project management system) as an example, it's much easier to look at the following graph and understand that Work session, Time tracking, Payment, and Github Issue bundles are pointing at a Project, which in turn points to an Account bundle. Github Issue can also reference itself.
This module adds that a tagging functionality to the Block Class module by implementing jQuery TextExt.
In addition, other modules can implement their own hook_block_class_tags_classes() and return an array of their own predefined classes they would like to use.Dependencies
This module integrates with Hipchat to allow Hipchat to send messages to Drupal. Possible uses include:
If you use Drupal either in house or as part of a service to clients you're already aware of how versatile and useful it can be if utilised well. One of the benefits of using Drupal is that it's free, but there are other benefits available to you if you decide to join in with the community.
The TWG coding standards committee is announcing two coding standards changes for final discussion. These appear to have reached a point close enough to consensus for final completion. The new process for proposing and ratifying changes is documented on the coding standards project page.
The two issues being proposed are:
- Please relax requirement for @file when using OO Class or Interface per file: 'ERROR | Missing file doc comment'
- [policy, then patch] Consistent .install file layout
These proposals will be re-evaluated during the next coding standards meeting currently scheduled for February 5th. At that point the discussion may be extended, or the policy may be dismissed or ratified and moved to the ‘update documentation’ step.
Game Developers Conference officials are pleased to release the full results of the 4th annual GDC State of the Industry survey today, and now you can download a copy of the full report for yourself. ...
In this classic 2013 presentation, one-time Dragon Age lead writer David Gaider takes a look at how BioWare's romantic characters evolved from Baldur's Gate II to the Dragon Age series. ...