Upgrade Your Drupal Skills

We trained 1,000+ Drupal Developers over the last decade.

See Advanced Courses NAH, I know Enough

Create your own tokens in Drupal 7

Author: 
superadmin

Tokens are a pretty powerful weapon to have in your arsenal, and they actually come in useful a lot if you remember that they're there.

If you haven't used them before, tokens are essentially text placeholders - they can be static text, variables, field values, whatever you want really.

The Token API is now part of Drupal 7 core and as it turns out, using it to create your own tokens is super easy - you just need a couple of hooks.

The first hook, hook_token_info(), is used to declare any custom tokens.

Accessibility in the Real World: Top 6 Automation Misses

Author: 
rwild

Hitting a contractible deliverable for accessibility is generally easy enough, even despite Drupal's best efforts to scupper all attempts with forms and redundant labels and other hidden gotchas. A deliverable in these cases usually comes in the form of meeting a standard, whether it be a North American client wanting Section 508 coverage, or A UK client wishing for AA coverage and protection from UK disciplinary against the Accessibility Acts laws.

Making Targeted Drupal Cache Clears using Drush

Author: 
bryanbraun

The standard Drush command for clearing Drupal's cache looks like this:

        drush cache-clear all

(You can also use the shortened alias cc like this: drush cc all)

These commands give you the same result as when you click that cache clear button in the UI  it clears all of Drupal's internal caches.

Drupal 8 and the slow death of IE8

Author: 
David Corbacho

IE8 is resisting to die. Internet Explorer 8 world-wide usage is more popular than IE9 and even IE10

First, a small story.

Once upon a time, in 2012, when Drupal 8 was going to support IE8, we added HTML5Shiv to Drupal core to support HTML5 elements in IE8 and old browsers.

But during 2013 things happened. jQuery decided to split their library into: 

Adding Facebook Open Graph tags to your Drupal site

Author: 
Daniel Sipos

In this article we are going to look at implementing the Facebook Open Graph (OG) tags on a Drupal site. It involves a bit of coding but nothing too major so bear with me. All the code we are going to write goes into the theme's template.php file so no need to to create a module for it. And if your theme does not yet have this file, go ahead and create it.

One revision control system to rule them all

Author: 
Harry Slaughter

The first revision control system I ever used was called RCS. It was the pre-cursor to CVS and stored all revision data locally. It was nifty but very limited and not suited for group development. CVS was the first shared revisioning system I used. It was rock solid, IMHO. But it had a few big problems, like the inability to rename or move files. Everything had to be deleted and re-added. 

Since those days, I've used several other revisioning systems: Perforce, Bitkeeper, Clearcase, Subversion and GIT.

Drupal 8: Attaching Core Libraries and Other Scripts to Your Theme

Author: 
Danny Englander

In this blog post, we learn how to add core and theme scripts in to Drupal 8 using a theme libraries YML or YAML file.

NOTE, Because of the ever evolving nature of Drupal 8, some of the contents in this post may be out of date.

Drupal 8: Attaching Core Libraries and Other Scripts to Your Theme

For the past six months, I've been in the process of porting my contrib theme, Gratis, to Drupal 8. One of the challenges for contrib is Drupal 8 has been a constant moving target in terms of API changes. With every new Alpha of Drupal 8, I've had to adjust many bits of theme code to adhere to these new APIs.

Drupal 8: Attaching Core Libraries and Other Scripts to Your Theme

Author: 
dannyenglander311@gmail.com (Danny Englander)

Note: all, or parts of this article may be out of date

For the past six months, I've been in the process of porting my contrib theme, Gratis, to Drupal 8. One of the challenges for contrib is Drupal 8 has been a constant moving target in terms of API changes. With every new Alpha of Drupal 8, I've had to adjust many bits of theme code to adhere to these new APIs.

Pages

About Drupal Sun

Drupal Sun is an Evolving Web project. It allows you to:

  • Do full-text search on all the articles in Drupal Planet (thanks to Apache Solr)
  • Facet based on tags, author, or feed
  • Flip through articles quickly (with j/k or arrow keys) to find what you're interested in
  • View the entire article text inline, or in the context of the site where it was created

See the blog post at Evolving Web

Evolving Web
Subscribe to Drupal Sun RSS