Feed aggregator

Forum One: Getting Started With Drupal 8 Code

Drupal News - July 21, 2014 - 12:18pm

Want to get started with Drupal 8 coding, but not sure where to begin?

Fear not! That’s exactly how I felt before I jumped down the rabbit hole by attending my first Drupal 8 code sprint, organized by the Forum One team earlier this month. Others there seemed to be in the same place I was in – which is to say that what we anticipated to be a quick installation actually turned into a lot of time spent that I’d have rather spent contributing!

To spare the next person from this experience I have created a friendly slideshow to guide you through the setup and installation process of getting Drupal 8 up-and-running locally.

Enjoy! And if you have any suggestions for enhancements, please leave them in the comments below

Drupal Commerce: Converting Your Existing Platform.sh Development Environment to a Makefile

Drupal News - July 21, 2014 - 11:28am

One of the most exciting features of Platform.sh is it’s ability to use Drush makefiles to rapidly prototype sites. By default, new projects can start with a makefile that will automatically add Commerce Kickstart or vanilla Drupal. Then, using the makefile, you can add new modules, themes, and libraries, by simply adding a few lines to the makefile and commiting. When you push the changes to your platform, the entire site will be rebuilt. Plus, whenever you’re in “makefile mode” any extra files that are in the root of the respository get pushed into sites/all/default. So if you have any custom modules, you can just stick them in modules/ and they’ll end up in sites/all/default/modules. This can make your code bases not only small, but far more manageable. You can convert a site that isn’t a makefile into a makefile. And in this post, that’s exactly what we’re going to do.

Mediacurrent: 10 Reasons Enterprise Marketers Choose Drupal

Drupal News - July 21, 2014 - 7:43am

As marketers, you understand the importance of having a system that promotes ease and efficiency when it comes to implementing marketing processes. You want to create content once and use it over and over in different ways to create contextual user experiences. 

Drupal provides you with a variety of powerful, integrated tools to not only help you understand who you visitors are and what they want to accomplish, but to also dig deeper into their interactions, engagements and habits with your site. 

Here are just a few reasons why enterprise marketers adopt Drupal. 
 

Phase2: Talking Mapping at the 2014 ESIP Summer Meeting

Drupal News - July 21, 2014 - 6:43am

Last week I had the opportunity to present at the Federation of Earth Science Information Partners (ESIP) Summer Meeting held in Copper Mountain, CO. The Summer Meeting is a gathering of IT professionals from across several different agencies such as NASA, NOAA and USGS. Each year, the group comes together to talk about the challenges that they each face while trying to engage and support the scientific community.

When I got in on Wednesday a few of us got together to talk about how to kickstart the Science on Drupal group. While there’s been a science presence in the Drupal community for several years now in one form or another, there’s been a recent interest in pooling resources together to make a larger group. We had a great time strategizing how to grow the group over chips and salsa.

For my presentation, I went over various different tools for doing online mapping work, both with native Drupal tools and other toolsets.

One of the big challenges that this community has to face is how to work with large datasets that don’t fit neatly into a typical Drupal site. For my part, we spent a lot of time going over how to leverage tools like D3, CartoDB, GeoServer, and Mapbox to connect to data outside of Drupal and provide meaningful interaction with it.

They also exposed me to DEIMS, a Drupal distribution that they had collaborated on that also features some interesting ways to interact with external data. There was a great presentation at Drupalcon Austin on the distribution that’s definitely worth checking out.

If you’re interested in catching the presentation, the slides are posted on Github and the video is here. If you’re interested in catching up with what’s going on with the Drupal in Science working group, check out their page on groups.drupal.org.

Thanks again to Adam Shepherd and the rest of the ESIP Drupal Working Group for inviting me out to hang out and learn from their experiences.

Drupal core announcements: Work on Drupal 8 at major core sprints, August 7-10

Drupal News - July 21, 2014 - 6:22am

This summer is an important time to help get Drupal 8 done, so there is no good reason to skip getting together. We are holding two Drupal 8 sprints at the same time on August 7 to 10: one in North America at TCDrupal, and one in Europe at Drupalaton. Sprinters from both events will collaborate on Drupal 8 issues.

Join jthorson, xjm, alexpott, Crell, mtift, YesCT, and other lead Drupal 8 developers at Twin Cities DrupalCamp (North America) or dawehner, swentel, fago, Wim Leers, rteijeiro, lewisnyman, emma.maria and Gábor Hojtsy among others at Drupalaton (Europe). Read more in the event announcement.

Module Monday: Node Revision Delete

Drupal News - July 21, 2014 - 4:00am

Drupal's revisioning system is really powerful. Out of the box we can keep track of changes in our content and restore to a previous version with just a couple clicks. However, on large sites with a lot of activity in their content, revisions can grow exponentially up to a size that it can compromise performance and disk storage. The Node Revision Delete module can help us to keep this under control.

Acquia: 5 Erreurs à éviter pour votre site Drupal - Numéro 5 : la maintenance

Drupal News - July 21, 2014 - 1:23am

Dans les précédents articles de cette série, nous nous sommes penchés sur l’architecture, la sécurité, la performance et le choix de

Dave Hall Consulting: Interacting with the Acquia Cloud API with Python

Drupal News - July 21, 2014 - 12:54am

The Acquia Cloud API makes it easy to manage sites on the platform. The API allows you to perform many administrative tasks including creating, destroying and copying databases, deploying code, managing domains and copying files.

Acquia offers 2 official clients. The primary client is a drush plugin which can only be downloaded from Acquia Insight. The other is a PHP library which states in the README that it is "[n]ot ready for production usage".

On a recent project using WF Tools we needed some pretty advanced deployment scripts for sites hosted on Acquia Cloud. We had tried using a mix of bash and PHP, but that created a maintenance nightmare, so we switched to Python.

I was unable to find a high quality Python library, so I wrote a python client for the Acquia Cloud API. The library implements all of the features that we needed, so there is a few things missing.

Chaining complex commands together is easy because the library implements a fluent interface. An extreme example of what is possible is below:

import acapi # Instantiate the client c = acapi.Client('[email protected]', 'acquia-token') # Copy the prod db to dev, make a backup of the dev db and download it to /tmp c.site('mysite').environment('prod').db('mysite').copy('dev').backups().create().download('/tmp/backup.sql.gz')

Some of the code is library is "borrowed" from the Python client for Twilio. The library is licensed under the terms of the MIT license.

I am continuing to develop the library. Consider this a working alpha. Improving error handling, creating a comprehensive test suite and implementing the missing API calls are all on the roadmap. Pull requests are welcome.

The code is PEP 8 (coding standards and PEP 257 (documentation standards) compliant and uses the numpydoc for code documentation.

Check out the Python client for Acquia's Cloud API on github.

godel.com.au: Creating an immersive Drupal front-end with Yes Way

Drupal News - July 20, 2014 - 11:20pm
Mon July 21, 2014 Creating an immersive Drupal front-end with Yes Way

Yes Way are a creative agency who connect businesses, brands and communities with the creative talent they need. They specialise in strategic planning for businesses and representation for creative individuals to engage their target audience through branding, events and marketing.

The brief

Godel were approached by Yes Way to help complete designs for their website update and produce a custom responsive website built in a Drupal 7 backend with a totally custom front-end that leveraged a minimalist and modern Aurora subtheme, Singularity grids and a lot of Javascript via Drupal behaviors.

The brief was to create a vibrant online presence to reflect the creatives that Yes Way represent; specialists in photography, street art, fine art, illustration and fashion styling. Yes Way wanted to stick with their existing branding, but give it new life through a new design. As such, the new site design that we created for Yes Way is not only clean and minimalist with a typographic focus, but also projects a vibrant persona, bringing creative talent to the forefront through their personal profiles and visual portfolios.

Working on projects like this is a great experience as it allows us to work closely with the client to iteratively improve on an existing product. Although we did the redesign and site build in a short period of time this time, this sort of iterative improvement process can work as on ongoing agreement as well, allowing us to build trust with our clients and gradually make improvements to their product over time, keeping it up to current standards in design and dev and allowing the client freedom to make suggestions based on their changing needs.

The site

Yes Way's new landing page features a full length background image and a retractable navigation which engages as soon as the viewer starts scrolling. More information is revealed about Yes Way as you scroll down past each header and when the a navigation menu item is clicked the screen smoothly transits to the appropriate area on the site using jQuery.

Godel wanted to bring the site up to date with dynamic and responsive features. Responsive design elements include the use of mmenu which creates a slick, user-friendly navigation pattern for mobile devices. The desktop functions as a "one pager" with some pop-up overlays. The navigation uses the scrollTo library to hijack the normal scrolling behaviour of the browser when the user clicks a menu item from the sticky header. The idea was to make site navigation as easy and fun as possible - the user never has to reload the page or follow a series of links, only interact with a single page.

All of the second-level sections are created using a nice little technique we've created using data-attributes. It allows us to create an immersive Javascript-powered app-style front end for a Drupal CMS backend, which creates websites that don't necessarily have to look "like Drupal sites".

Data attributes and custom display suite fields

This section is a brief technical explanation of our technique, skip it if it's Greek to you!
The day we learnt about custom display suite fields from This PreviousNext blog post was a happy day for us. Although DS offers a lot of great tools for UI-focused node display building, for devs who want more control it was starting to feel a bit limiting. We didn't want to go down the php field route (shudder) so we were happy to be able to create fields with PHP possibilities through this custom DS field technique.

One of the best things about the custom fields is the ability to generate fields that actually contain more data than the eye can see, stored in data attributes of HTML elements away from the visible part of the DOM. For example, we were able to store all of the data for an artist portfolio popup in the teaser tile for that artist that appears on the initial page load. What that means is that when the user clicks on an artist's face to view their portfolio, it loads dynamically in to the page via Javascript and that data that it displays is already stored on the page, just hidden.

First, we define the info hook for our field:

/** * Implements hook_ds_fields_info. */ function gp_global_ds_fields_info($entity_type) { $fields = array(); $fields['node']['body'] = array( 'title' => t('Body data attribute'), 'field_type' => DS_FIELD_TYPE_FUNCTION, 'function' => 'gp_global_ds_field_body', ); if (isset($fields[$entity_type])) { return array($entity_type => $fields[$entity_type]); } return; }

Then we make the markup for the field itself, which is surprisingly simple:

/** * Return the body as a div with a data attribute. */ function gp_global_ds_field_body($field) { $entity = $field['entity']; if(isset($entity->body[LANGUAGE_NONE][0]['safe_value'])){ $data = $entity->body[LANGUAGE_NONE][0]['safe_value']; $content = '<div class="body" data-body="' . check_plain($data) . '"></div>'; return $content; } }

The key is "data-body", a custom data attribute we create and then store the body text in. It doesn't get rendered on the page until we grab it with our Javascript, like this (abridged version):

(function($, undefined) { // We get the element that has the data-attribute on it and extract the data from the attribute bodyEl: '.fullwidth .body', _this.bodytext = $(element).find('[data-body]').data('body'); bodyText: function bodyText() var _this = Drupal.behaviors.overlayAnimate; // We replace the HTML of the blank element with the data we grabbed earlier. $(_this.bodyEl).html(_this.bodytext); }, }) (jQuery); Why this technique is meaningful

We think it's a step towards creating a better reputation for Drupal by creating beautiful sites that don't necessarily need to use the template themes Drupal provides. We use techniques like this in combination with very bare themes to build up our own custom front-end markup.

You can see this technique in action with the unique hover state overlays for each featured artist on the main page. The user can click through to more information about each person including a written blurb, gallery of images and even a video. For each of those things, the data is entered as a node in the Drupal backend, sent to the front of the site as a data attribute in a custom display suite field and triggered in to visibility via Javascript.

All in all, the user experience is intended to have an immersive web-app feeling, with content loading in to the page quietly, displayed in seamless overlays rather than new page loads and making them most of a one-page layout with some animated navigation styles. Yes Way are able to keep users on their site for longer by holding their attention for longer. Because users aren't directed off site (not even off-page!) they're more likely to click around and explore the single page they see. Because we already load the data into the page before we display it, they get the added benefit of a fast-loading site as well.

We think the result is an engaging site that uses some cool techniques to satisfy a real business need. Check out the website here!

Emma ForsterProject managerEmma manages our client relations and sits in between the dev team and the site owner to facilitate efficient, productive and fun projects. Ideas to help keep your Drupal project secure against the OWASP Top 10 Fri July 11, 2014 I'm sure you've heard the phrase "Security is a process, not a product" before, or something along those lines. Drupal has a pretty good track record as far as Web-based CMS security goes, and there's a dedicated team of experts looking after Core and Contrib, but it's no secret that...

Larry Garfield: An open letter to conference organizers

Drupal News - July 19, 2014 - 3:51pm

Let's be honest, I spend a lot of time at conferences. Over the past 2 years or so I've averaged more than one speaking engagement at a conference per month, including a half-dozen keynotes. I've also helped organize several conferences, mostly DrupalCamps and DrupalCons. I'd estimate conferences make up more than a third of my professional activity. (Incidentally, if someone can tell me how the hell that happened I'd love to hear it; I'm still confused by it.)

As a result I've gotten to see a wide variety of conference setups, plans, crazy ideas, and crazy wonderful ideas. There are many wonderful things that conference organizers do, or do differently, and of course plenty of things that they screw up.

I want to take this opportunity to share some of that experience with the organizers of various conferences together, rather than in one-off feedback forms that only one conference will see. To be clear, while I definitely think there are areas that many conferences could improve I don't want anyone to take this letter as a slam on conference organizers. These are people who put in way more time than you think, often without being paid to do so, out of a love for the community, for learning and sharing, and for you. Whatever else you may think about a conference or this list, the next time you're at a conference take a moment to find one of the organizers and give them a huge hug and/or firm handshake (as is their preference) and say thank you for all the work that they do.

read more

MariqueCalcus: Optimize before you go live (Part 2).

Drupal News - July 19, 2014 - 7:30am
Part 2: Site builder

Drupal is a powerful content management framework but it's even better when you take into account the 20000+ modules and themes provided by the community. Whatever you are building, you will most likely find a module to help you. When you embrace the wonderful world of free and open source code, keep in mind that end users and search engines actually prefer fast websites. In this article we will discuss some common pitfalls that should be avoid, and will give some suggestions for site builder to create light and fast websites. This post is part of a multipart series. The first instalment was related to performance for back-end developer.

Read More...

Drupal core announcements: Tuesday, July 29: Drupal 8.0.x being branched for semantic versioning

Drupal News - July 18, 2014 - 2:15pm
Start:  2014-07-29 12:00 - 14:00 America/New_York Online meeting (eg. IRC meeting)

On this date, the new 8.0.x branch for Drupal 8 will be created so we can start using the new Drupal release cycle in advance of beta 1.

Steps involved are:

  • drumm will create the 8.0.x branch
  • Existing issues will be moved automatically from 8.x-dev to 8.0.x-dev (this may take a couple of hours)
  • Testbot will be patched to look at the new 8.0.x branch instead of the old 8.x branch.

After we're sure there is no fallout from this, the README.txt on the old 8.x will be amended to inform about the change, and then the 8.x branch will be removed entirely after a few days.

Core developers should do the following once the process is complete to ensure they're patching against the latest version of the code:

git fetch
git checkout 8.0.x

Woohoo!

Propeople Blog: Building Quality Into Drupal Development Workflow

Drupal News - July 18, 2014 - 10:29am
Background 

Building a large Drupal website can be a daunting and complex process. There are many engineering, project and other risks associated with it. More often than not, budget and deadline overrun occurs.

Moreover, large projects often result in a prolonged Q/A, testing and troubleshooting period which once again can pose additional risks. 

Propeople was recently presented with the following challenge by a client:

 
  • 1200 budget hours

  • 2 month of development time

  • 4 developers

  • 1 hard launch date

To add another challenge to the mix, there was minimal Q/A engineer availability for the project.

In order to meet the client’s budget and timeline requirements above, we needed to rethink a new development workflow that largely incorporated quality into the project in order to meet both the deadline and budget requirements. 

 Typical Development Workflow 

Propeople selected GIT as the revisioning software to manage the development process/workflow for the project. GIT is a popular, open source distributed versioning system used by many organizations of all sizes. For more information on GIT, you can visit this site.

Organizations that employ a repository management system such as GIT, typically one of the following workflow models is used.

 1. Using the Master Branch

This workflow is typically employed by smaller organizations with a small number of developers working on the project. In this workflow, all of the code changes are committed into the master branch by all of the developers. It results in a linear development workflow:

This workflow works well at keeping everything simple, allowing developers to avoid branching and merging. It also allows for the creation of some tags to designate stable release or state of the code repository.

However, there are many drawbacks to this workflow. One of the most overlooked facts is that most likely, John and Joe will not check each other’s commits. Once a change is committed to the master branch, the change is incorporated into the project until someone notices any poorly written code or commits. 

 2. Development -> Stage -> Production

One of the most widely adopted workflows, this three-tiered workflow fully leverages GIT’s ability to create and merge branches. It also gives web developers the ability to mirror the branches to a different “working environment” so that they can have:

  • Development website

  • Staging website

  • Production website

3. Feature Branch

We ultimately chose to adopt a “feature” branch workflow for this project. This model takes advantage of the git branching/merging model. It is also chosen because we did not necessarily need a “staging” or “production” environment during the agile development phase.

This workflow works well at keeping everything simple, allowing developers to avoid branching and merging. It also allows for the creation of some tags to designate stable release or state of the code repository.

However, there are many drawbacks to this workflow. One of the most overlooked facts is that most likely, John and Joe will not check each other’s commits. Once a change is committed to the master branch, the change is incorporated into the project until someone notices any poorly written code or commits. 

 

Introduction of Github and the Magical Pull Request

 

One of the biggest reasons that we adopted the feature branch approach is Github. Github.com is one of the longest-running and most popular hosted git management platforms. It offers many developer friendly tools. One of the most useful and popular tools and functions is the Pull Request.

 Looking ahead

We are looking ahead to adding automated regression testing to the pull requests. This will allow developers to easily see page changes caused by their commits.

A more integrated issue and time tracking system would help consolidate all of the project efforts into Github. We used a separate issue tracking and hour tracking system for the project.

 Conclusion

Largely due to the new development workflow, we were able to meet the the hard deadline set by client. Although the project had a 8% budget overrun, this number is a great success, given the 27%* industry average. We were also able to reduce our post launch Q/A cycle by 66.67%, from 30 days to 10 days.

A big thanks to the masterminds behind the new development workflow:

Yuriy Gerasimov (https://www.drupal.org/user/257311)

Andriy Podanenko (https://www.drupal.org/u/podarok)

 

http://hbr.org/2011/09/why-your-it-project-may-be-riskier-than-you-think/

 

Tags: CIGITContinuous IntegrationQ/AProjectService category: TechnologyCheck this option to include this post in Planet Drupal aggregator: planetTopics: Tech & Development

Forum One: Building Your (Drupal) Business: What Keeps You Up At Night?

Drupal News - July 18, 2014 - 6:57am

How to get more business in the door, and once you have it – how in the world to get it all done?!

These were some of the issues that “keep them up at night”  raised by business owners in the Drupal professional services sector at the recent DrupalCon in Austin, TX.  I’ve co-led a “Bats of a Feather”  session at DrupalCon for three years now for business owners on the key issues they face; this year we had, again, a highly engaged audience of about 40-50 business owners and leaders join. Sean Larkin of ThinkShout, a digital agency in Portland, OR, joined me in facilitating the discussion. The attendees were all from consulting / professional services firms, ranging in size from 1 to 80, with a median size of about a dozen employees.

We listed and clustered the topics / questions of primary interest (see picture of our flip chart notes), which were:

  • Business development and lead generation – how to keep work flowing in
  • Growth and capacity – how to balance hiring with business inflow
  • Support and hosting – how to provide effective support and hosting services
  • Scaling a sales team
  • The Acquia effect – how Acquia’s presence affects Drupal agencies
  • Partnering with other firms.

We homed in on the two ends of the business pipeline – how to bring in more work, and how to scale the business once you have the work. Here are a few of the highlights:

Subcontracting

We had a lively discussion about whether and how to work as a subcontractor to other larger firms as a way to keep busy. Some folks are happy to do “white label” work for which they do not need to do business development, while others avoid it.

Pros: Tap into the clientele and BD pipeline of a larger organization that already has a backlog.

Cons: You’ll never build your own vision of your company if you are anonymous and behind someone else, your rates will never be as good, and you might sometimes end up being the scapegoat.

Interestingly, at Forum One, we did not subcontract for larger firms in our early growth stages, but it has become a sizable part of our portfolio in recent years.

Partnering

We had good discussion about partnering among other firms – finding the businesses in your area that have similar or complementary offerings, and looking to scratch each others’ backs. The Drupal share of the total web CMS market pie is still small, so we can all pitch in with each other to make the pie even bigger.

Why grow?  A lot of the owners from solo or very small shops have to do everything from bringing in the business to doing the work and sending the invoices. Not to mention cleaning the bathroom before a client comes over (been there). They are eager to grow out of that stage and have help so they can focus on what they feel they are best at. But how far to grow? One of the owners spoke about his satisfaction with having a 15-person team that was cohesive, cooperative, and did great work for their clients; he said he had no aspirations to grow beyond that and have bigger headaches.  It’s great that he’s clear about his goals for the business and is on track.  Others talked about wanting to build bigger practices.

At Forum One, I’ve been in the thick of all these stages of growth, from a small team of three doing everything, to a multidisciplinary team of about 80. In our case, we’ve chosen to grow aggressively for three main reasons: to expand the capabilities we can offer our clients, increase the impact of our work for our clients, and offer growing career opportunities to our team.

Taking big steps

A few of the attendees said they are grappling with issues of when and how to take their next big step – whether it’s hiring their first staff person, signing a lease for office space, or bringing on their first operational hire (project manager, BD person, operations manager, etc.). We did not have time to talk about these issues, but I think those of us who have been through these big steps were smiling to ourselves. I know I was. Not because we know the answers – there are no easy ones. But we’ve been through it and know that those stages are part of the excitement and the challenge of building a business out of nothing!

For further dialogue and networking on these topics, check out and join the LinkedIn group for owners of Drupal services firms called “Drupal CxO Owners Network.”

ThinkShout: Getting Started with SASS for Drupal and Zen, Part II

Drupal News - July 18, 2014 - 5:00am

In part one of "Getting Started with SASS for Drupal and Zen," we went over getting your environment set up to work with SASS.

If you followed the instructions in part one, you should have SASS/Compass, Zen, and your sub-theme installed. Your theme will be installed in sites/all/YOUR THEME NAME.

Test the Install

Let's test to see if SASS is installed and compiling. Use your toolkit to compile your SASS directory or run compass watch from the command line in your theme directory. You should see the following output.

>>> Compass is watching for changes. Press Ctrl-C to Stop

To see more Compass commands, you can run Compass -h.

Open your Drupal site in your browser. Now that we are polling for changes with Compass, let's add the following to style.scss to see our changes being applied. After you save your change, refresh your page and you should see the difference.

body { background: #000; color: #fff; }

Compass will also output the overwritten files in your console if you are using command line to run it. It's okay to delete the CSS you added, so things will appear like the default Zen theme.

SASS Primer

If you haven't used SASS, prepare to be hooked on it. Some advantages of SASS include DRY (Don't Repeat Yourself), CSS, function (mixins) for repetitive and lengthy blocks of CSS, and the ability to extend common styles.

Variables

Variables in SASS start with a '$'. Use variables to define values you will use throughout your stylesheets. For example, let's define our color palette in _init.scss. There is a commented section for colors. You can drop them in there. I'm going to grab this zen 2 palette from Kuler.

$sand: #b0ae9e; $brown: #424345; $white: #fafeff; $seagreen: #9dbec7; $wetsand: #b0a092; $red: #ff0000; $gray: #a1a1a1;

Now these colors can be used everywhere in our stylesheets without having to write the hex value each time.

Nesting

In typical CSS fashion, we would write a style like this:

a { color: #9dbec7; text-decoration: none; } a:hover { color: #424345; -webkit-transition: color 0.5 ease-out 0.5s; -moz-transition: color 0.5 ease-out 0.5s; -o-transition: color 0.5 ease-out 0.5; transition: color 0.5 ease-out 0.5s; }

With SASS, we can nest the style like this:

a { color: $seagreen; text-decoration: none; &:hover { color: $brown; -webkit-transition: color 0.5s ease-out 0.5s; -moz-transition: color 0.5s ease-out 0.5s; -o-transition: color 0.5s ease-out 0.5; transition: color 0.5s ease-out 0.5s; } }

The ampersand represents the outer anchor selector. Also, notice how we are relying on the variables we defined for the colors instead of using hex values.

Mixins and Extends Mixins

Let's clean up that transition by writing a mixin for it.

@mixin transition($property, $duration, $easing) { -webkit-transition: $color $duration $easing; -moz-transition: $color $duration $easing; -o-transition: $color $duration $easing; transition: $color $duration $easing; }

Now we can rewrite the anchor style and include the transition mixin.

a { color: $seagreen; text-decoration: none; &:hover { color: $brown; @include transition(color, 0.5s, ease-out, 0.5s); } }

Keep in mind that Compass already provides some great cross-browser mixins for CSS3. Style transition is one of them.

Extends

SASS lets you inherit common styles. A practical example is styling buttons. Buttons might have common styling, but differ in color or size.

// This is a SASS comment /* This is also a comment */ // Our default button .button { background: $seagreen; padding: 1em; border: 1px solid $seagreen; } .primary { @extend .button; padding: 1.5em 2em; } .warn { @extend .button; background: $red; } .disabled { @extend .button; background: $gray; }

So why didn't we just use nesting? Extending keeps you from having to write multiple class names on html elements instead of writing it like the following:

<a class="button primary" href="http://thinkshout.com">ThinkShout</a>

We can use one class because 'primary' will include all the same styles as 'button.'

<a class="primary" href="http://thinkshout.com">ThinkShout</a> Using SASS in Your Theme

The stylesheets in your Zen sub-theme are organized according to the principles of SMACSS. You'll notice the style.scss file doesn't actually contain any styles, but only imports. The _init.scss file contains additional imports such as Zen Grids and Compass utilities, mixins and helpers. If you look in layouts/responsive.scss, you'll see the Zen theme includes a mobile-first responsive layout by default.

Let's add some sass of our own. Add a file called _main-nav.scss to the components directory. In that file, add the following SASS. It's similar to the style we used in our SASS primer.

#navigation { background: $sand; .links { a, a:visited { color: $white; text-decoration: none; &:hover { color: $brown; @include transition(color, 0.5s, ease-out, 0.5s); } } } }

In order to get this change to take effect, you need to import it into your style.scss. Add an import statement for _main-nav.scss in the components section.

/* Component (SMACSS module) rules */ @import "components/misc"; @import "components/main-nav"; // Add this import statement

You may be wondering why you don't need the underscore in front of the file when importing. The underscore tells SASS that the file is a partial. The partial won't be compiled into its own file. It will be included in the style.css when compiled. If you don't have Compass running, go ahead and run compass watch in your theme directory or use your toolkit to compile. You should see your navigation style applied to your Drupal site when you refresh.

As you progress in your SASS development, I encourage you to use the SASS Globbing gem. It makes importing a breeze.

Now that you have used SASS in your theme and have the basics down, be sure to check out the SASS and Zen Grids documentation to be even more productive in your theme development. Get the code for this article on Github.

Drupal Easy: BYOD (Bring Your Own Developers) Drupal Career Training

Drupal News - July 17, 2014 - 1:11pm

With four sessions graduating more than 60 People over the past four years, there's no doubt that the Drupal Career Starter Program can bring aspiring developers from zero to hero in just a matter of a few months. Imagine what it can do for you, or your people, who are already developers, but need to be trained up in Drupal. We have, and are making it highly accessible in a live, online format designed to fit into working schedules.

The upcoming Drupal Career Online training program kicks off in just about a month, and your organization now has the ability to choose the developer(s) that match well to your team and leverage our unique, holistic training to turn them into a solid member of your Drupal development team.

read more

Drupal core announcements: Drupal core updates for July 16, 2014

Drupal News - July 17, 2014 - 12:45pm
What's new with Drupal 8?

This week saw the commit of part one and two of the major menu-system rewrite in which menu-links become plugins. The original patch weighed in at over 600kb and was one of the remaining seven beta-blockers. Splitting it into five separate issues made reviews more forthcoming and this was evident with part one and two moving quickly from needs review to RTBC to ultimately being committed. Reviewers have now moved onto parts three through five.
There was a massive volume of commits this week with cleanups keeping the committers very-busy, lots of deprecated functions were removed and lots of procedural menu and form code was ported to the new Object-oriented approaches.

Where's Drupal 8 at in terms of release?

In the past week, we've fixed 3 critical issues and 8 major issues, and opened 5 criticals and 9 majors. That puts us overall at 107 release-blocking critical issues and 623 major issues.

Outstanding beta blockers

Outstanding critical issues in Drupal 8

Outstanding major issues in Drupal 8

Where can I help? Top criticals to hit this week

Each week, we check with core maintainers and contributors for the "extra critical" criticals that are blocking other work. These issues are often tough problems with a long history. If you're familiar with the problem-space of one of these issues and have the time to dig in, help drive it forward by reviewing, improving, and testing its patch, and by making sure the issue's summary is up to date and any API changes are documented with a draft change record, we could use your help!

More ways to help

Issue #1679344: Race condition in node_save() when not using DB for cache_field recently caused a Drupal.org outage. The issue already has a proposed resolution recommended in comment #24 — help out by reviewing the patch for either D7 or D8.

Additionally, there are a bunch of easy documentation issues which need some help moving forward. For each of these, there is a "Child Issues" sidebar. Look there for issues that are "active", "needs work", or "needs review":

As always, if you're new to contributing to core, check out Core contribution mentoring hours. Twice per week, you can log into IRC and helpful Drupal core mentors will get you set up with answers to any of your questions, plus provide some useful issues to work on.

You can also help by sponsoring Drupal core development.

Notable Commits

The best of git log --since "1 week ago" --pretty=oneline (112 commits in total):

  • Various conversions of controllers and forms to OO code, only a handful remain now
    • Issue 2010246 by tim.plunkett, tkuldeep17, plopesc, InternetDevels, pfrenssen, googletorp: Convert update_manager_install_form, update_manager_update_form, update_manager_update_ready_form to the new form interface.
    • Issue 2030165 by Berdir, tim.plunkett, vijaycs85, tkuldeep17 | rteijeiro: Convert form_test_* functions to classes.
    • Issue 1978926 by likin, YesCT, Pancho, kim.pepper, h3rj4n, tim.plunkett, disasm, Luxian, neetu morwani | vijaycs85: Convert locale_translation_status_form to a Controller.
    • Issue 2132477 by tkuldeep17, tim.plunkett | shameemkm: Convert batch_test forms to controllers.
    • Issue 2086499 by phiit, tim.plunkett | Gábor Hojtsy: Convert two page callbacks in language_elements_test.module to the new controller system.
    • Issue 2078867 by tim.plunkett, jackbravo, ianthomas_uk, InternetDevels, piyuesh23, disasm, nano_monkey | vijaycs85: Convert _form_test_* functions to classes.
    • Issue 1998198 by pwolanin, splatio, Albert Volkman, tim.plunkett, andypost, disasm, Les Lim, tkuldeep17: Convert user_pass_reset to a new-style Form object.
    • Issue 2302525 by tim.plunkett: Convert file_module_test_form to a class.
    • Issue 2078015 by er.pushpinderrana, RoSk0 | alexanansi: Modernize views_test_data.module forms.
    • Issue 2302531 by tim.plunkett: Convert database_test_theme_tablesort to a class.
  • Issue 2291137 by cilefen | webchick: Rename various *links.yml files to improve DX.
  • Issue 2202511 by hussainweb, benjy | mikeryan: Added Implement migration groups.
  • Issue 2302463 by effulgentsia: Cleanup User::hasPermission() and UserSession::hasPermission() to follow Law of Demeter.
  • Issue 2302331 by kim.pepper: Move drupal_valid_path to PathValidator service.
  • Issue 2296839 by MKorostoff, er.pushpinderrana | YesCT: Remove deprecated comment_num_new().
  • Issue 2289063 by larowlan, andypost | Berdir: Change contact message entity to behave more like a normal entity.
  • Issue 2301239 by pwolanin, dawehner, Wim Leers, effulgentsia, joelpittet, larowlan, xjm, YesCT, kgoel, victoru, berdir, likin, and plach: MenuLinkNG part1 (no UI or conversions): plugins (static + MenuLinkContent) + MenuLinkManager + MenuTreeStorage.
  • Issue 2284103 by alexpott, fabpot, damiankloip, Xano, Xen, Berdir: Fixed Remove the request from the container - this switches from using Request to RequestStack, gets rid of our custom HttpKernel and the Request scope, lets us upgrade Symfony past 2.3 and closes a critical. Special thanks to Fabien Potencier, Project Lead for Symfony for getting the ball rolling and working with the Drupal community on patches.
  • More standardising of entity-field API
    • Issue 2292821 by andypost, larowlan: Use widget for comment subject field.
    • Issue 1498662 by andypost, larowlan | dawehner: Refactor comment entity properties to multilingual.
    • Issue 1856562 by andypost | sun: Convert "Subject" and "Message" into Message base fields.
  • Lots of cleanup of deprecated functions
    • Issue 2297487 by er.pushpinderrana, marcingy: Remove the check_plain function.
    • Issue 2301591 by joshi.rohit100: Remove drupal_rebuild_form() as it is deprecated.
    • Issue 2208893 by ngocketit, longwave: Remove unused functions from Views.
    • Issue 2301601 by joshi.rohit100: Remove drupal_validate_form() as it is deprecated.
    • Issue 2301587 by joshi.rohit100: Remove form_state_defaults() as it is deprecated.
    • Issue 2301577 by ParisLiakos, joshi.rohit100: Remove drupal_alter() as it is deprecated.
    • Issue 2300853 by joshi.rohit100: Remove language() method from bootstrap.inc as it is deprecated.
    • Issue 2300891 by joshi.rohit100: Remove format_backtrace() from error.inc as deprecated.
    • Issue 2301597 by joshi.rohit100: Remove drupal_prepare_form() as it is deprecated.
    • Issue 2300831 by joshi.rohit100: Remove module_exists() as it is deprecated.
    • Issue 2300857 by joshi.rohit100: Remove lock() method from bootstrap.inc as deprecated.
    • Issue 2300821 by joshi.rohit100: Remove module_invoke_all() as it is deprecated.
    • Issue 2300847 by joshi.rohit100: Remove drupal_get_form() as it is deprecated.
    • Issue 2300843 by joshi.rohit100: Remove drupal_json_encode() and drupal_json_decode() methods as deprecated.
    • Issue 2300833 by joshi.rohit100: Remove module_hook() as it is deprecated.
    • Issue 2300697 by joshi.rohit100: Remove drupal_is_cli() as It is deprecated.
    • Issue 2299499 by joshi.rohit100: Remove form_clear_error() as it is deprecated.
    • Issue 2301975 by kim.pepper: Move drupal_is_front_page to PathMatcher service.
  • Issue 697760 by sun: Replace getInfo() in tests with native phpDoc + annotations (following PHPUnit).

You can also always check the Change records for Drupal core for the full list of Drupal 8 API changes from Drupal 7.

Drupal 8 Around the Interwebs

Blog posts about Drupal 8 and how much it's going to rock your face.

  • Drupalize.me recap Drupal 8's plugin system.
  • Nuvole give us a preview of their Amsterdam session on packaging and reusing configuration in Drupal 8.
  • chx gives us an update on Drupal 8 from both his and a MongoDB perspective.
  • Wunderkraut gave us the lowdown on configuration entities in Drupal 8.
  • Cameron Zemek from PreviousNext introduces us to Mink previewing one of the core-conversations from Amsterdam.
Drupal 8 in "Real Life" Whew! That's a wrap!

Do you follow Drupal Planet with devotion, or keep a close eye on the Drupal event calendar, or git pull origin 8.x every morning without fail before your coffee? We're looking for more contributors to help compile these posts. You could either take a few hours once every six weeks or so to put together a whole post, or help with one section more regularly. Contact xjm if you'd like to help communicate all the interesting happenings in Drupal 8!

AttachmentSize july_criticals.png40.56 KB july_majors.png37.64 KB july_beta_blockers.png32.25 KB

Mediacurrent: How to Start a Drupalcamp

Drupal News - July 17, 2014 - 8:23am

Getting a new regional Drupalcamp up and running appears daunting at first, but the support of the Drupal Community helps provide a giant head start. At Drupalcon 2014 in Austin, SVP of Professional Services Jeff Diecks shared some tips to help ease into the planning process.

Additional Resources

Advomatic: This Is The House That Jack Themed

Drupal News - July 17, 2014 - 6:47am

This is Jack:

Usually, Jack is theming beautiful website like these:

 

 

 

But when Jack's not in the office, he's got other things on his mind:

 

So when Jack's son grew out of his old room, Jack took on a new theming project:

 

Pretty delightful, huh?

 

And here's a bonus shot of Jack in his son's old room, where he video chats us from:

Yup, that's a monkey in a tree back there.

Syndicate content