Learn Drupal

May 3rd, 2011

When one begins building a theme, it's only natural to use one CSS file for everything. But that stops being fun after about 1500 lines. At that length, it becomes a serious task to grasp what's happening in the file, and the chances of a team member changing the wrong style inadvertently becomes greater.

This week, we spend a full 4 videos learning from some of the best examples in CSS stylesheet management so that when your stylesheets begin to plague your dreams, you have somewhere to turn.

As we begin to wrap up the series on theme file structure, and move into working with templates and theming function, we're going to spend a couple videos clearing up some of the areas we glossed over in previous videos. This week, we cover how to granularly enable or disabling toggling of thematic elements (not the kind that bumps a movie rating up to an R) with 'features'.

Here's a list of the new additions. Enjoy!

April 26th, 2011

Building a Drupal theme from scratch isn't for everybody. For most of us, sub-theming is the way to go because it leverages existing code and resources while still giving us the flexibility to extend the theme with styles and overrides. This week, we begin by going over just how to override just about anything from a sub-theme and demonstrate overriding a few key elements.

But for some of us, sub-theming isn't the right fit. We need to lock down our theme so we know what's going on in there, or maybe we need to flip some of the structure around, but we still don't want to start from scratch. For us folk, we can instead start by copying an existing theme and making it our own, and in our next video we do just that.

We finally wrap up by beginning a two-parter on CSS file structure and cover the rationale behind how to split up stylesheets for your theme.

Here's a list of the new videos. Enjoy!

April 19th, 2011

We've been building up to this moment for a while now. For the last several weeks, we've demonstrated how to create a theme from scratch, including working with the .info file, how to add a screenshot and overide the page template file. This week, we throw that all to the side and show you how to build a beautiful theme with a single file, through the clever use of something called "sub-theming".

Before we do away with the theme scaffolding we've been working so hard on, we're going to explain what the famed template.php file is for and how it helps maximize themer sanity. We then look at several template.php files from Drupal core themes to get a feel for what you can do in that logical haven. Finally we demonstrate how to use the template.php as a better place to put some poorly-positioned logic from a previous example.

When we finish up with template.php, we'll thoroughly explain that while what we've been working on for the past couple of weeks is a perfect learning exercise, it's usually much quicker and more efficient to use an existing theme as a starting point for your custom theme. We first discuss the benefits of sub-theming, and then leap right into making our own sub-theme.

Enjoy the new videos!

April 12th, 2011

If you've been enjoying the theming videos so far (more than 30 and counting), this week is going to be a fun one. We start off by explaining the most essential visual building blocks of a theme - regions - and work through how to add regions to your theme and use them in the Drupal user interface.

Regions are important, but they're not so much fun without styling. Our next step is walking you through adding a simple CSS file to your theme, followed in quick succession with how to add a JavaScript file, in which we explain the rationale behind adding JavaScript to a theme.

Finally, we show you how to extend the default theme settings page options to add your own settings, allowing other users to be able to manipulate aspects of your theme without having to touch theme code. Sweet!

April 12th, 2011

Today we repacked the resource pack to include a couple of fixes in the persons and trails(2) module examples. This new release also includes example files for upcoming Drupal 7 theming videos.

Enjoy!

April 5th, 2011

Last week we set the foundation for building a theme file structure, learning from popular themes such as Zen, Fusion and Basic. This week, we get our hands dirty with basic theme building. We begin by looking at the .info file and explain the various options that can be used. For those of you who have already watched the module .info file videos, you have a head start, but there's some unique properties to a theme info file you might want to check out.

Next, we create the base theme file structure and enable the theme. To give site builders a sense of what your theme will look like when enabled, we then walk you through creating a screenshot and adding it to your theme. Next, we'll show you how to add a default logo. Finally, we'll demonstrate the proper way of overriding the page template file within your theme.

Next week, we've got a nice series of videos lined up to further extend our built-from-scratch theme, including:

  • How to add a new region and what regions are
  • How to add a CSS file
  • How to add a JavaScript file
  • How to add a new setting to the theme settings form
  • How to set a default for a theme setting and use it in a template file
March 29th, 2011

Being a coder certainly has it's benefits. But without critical theming skills, you can start to feel a little like a sandwich without tomatoes. Or a crossbow without arrows. Or a pair of pink sunglasses without sequins glued on them. Or a ... well, you probably get the picture. But, if you do get the picture, can you theme it?

We're moving steadily forth into our 5th week of theming videos, and things are starting to get interesting. After laying down the basics like knowing what the theme layer is for and how to find the source of any output in Drupal, we're starting to peek into some theme folders and see what treasures lie within. Theme directories are a wildcard, you have a lot of freedom to set things up in a multitude of ways. But that freedom comes at the price of sometimes not knowing where to start.

This week is dedicated to theme file-gazing. We first look through the core Drupal themes and see how they have their files set up, and then we move onto four of the most popular contributed themes: Zen, Basic (a Zen offshoot), Fusion (FREE video) and Marinelli. Each theme has unique strategies and lessons to teach, and will help you get a feel for where to start as you develop your theme or modify an existing theme.

Next week we'll be getting deep into code, leveraging all of the tools and techniques we've reviewed this last month and begin to build an entire theme from scratch.

Thanks, and enjoy!
Chris Shattuck

March 29th, 2011

Several issues have been fixed in the source code resource pack, including the following:

  • Fixed input module, step 9, where the following error would display: Notice: Undefined index: values in input_more_form() (line 163 of /Users/willkelly18/Sites/drupal-7/sites/all/modules/custom/input/input.module).
  • Fixed pages module, step 7, where there was a White Screen of Death (WSOD) issue triggered by a misnamed menu callback.
  • Fixed trails-01 module with the hook_block_view() causing errors.
  • Fixed tips module error with notices displaying upon visiting the /tips page.
  • A couple other fixes

So, if you're following along, head over to the downloads page and grab the latest version.

March 22nd, 2011

Themes are touchy beasts. A line of funked-out CSS or a misnamed template file can send you careening down a path of sadistic uncertainty if you don't know what you're looking for. Well, here at Build a Module.com we think that's a little unfair. We should be able to change how our sites look without fear of wasting an entire day barking up the wrong tree, and this next batch of new videos is all about absolutely crushing that fear.

To begin with, we dive into some theme troubleshooting, looking at what happens when some HTML output you're trying to modify is getting lost in the shuffle. Next, we help you troubleshoot CSS issues, where styles you're trying to add just don't seem to be working. Since these last two videos are part the first chapter in our Drupal Theming Essentials series, we wrap it up with a review of the rich theming topics we've covered and some suggestions for next steps.

But wait, that's not all! We also begin our next chapter - aptly titled How to Build and Modify a Drupal Theme or Sub-Theme - with an overview of the themes that come with Drupal, along with a couple other core theme resources and a guide on where to put new themes. We then take you on a tour of the different components of a theme, including the .info file, the template.php file and lots more.

Next week we'll be diving into how to structure a theme directory and take a look at several interesting examples in both core Drupal and contributed themes.

Spread the code "springbreak2011" for FREE form-building videos!

Spring break is a time where people work on their form, right? Sun bathing, surfing, lounging about. As a conciliatory prize for those of you returning from spring break, or suffering in some other way from the end of those blissful days, we are offering all of the videos on our site that have the word "form" in them for free this next week. But only if you know the code.

If you know anyone that could benefit from a little Form API action, send a little tweet gently encouraging them to go to http://buildamodule.com/code and enter the code springbreak2011. That will grant them free access to form-building videos until March 28th, no strings attached!

Thanks and enjoy!
Chris Shattuck

March 14th, 2011

This year's Drupalcon was most excellent! I had the opportunity to meet a number of current and soon-to-be subscribers, and get some feedback on what you'd like to see in the future. Overall it seems like we're headed in the right direction, and I wanted to thank you so much for all your great ideas and insights. I'm looking forward to more face time at the next Drupal event!

As we complete the first chapter in the "Drupal Theming Essentials" video series, we demonstrate how to work with view modes in the Drupal user interface, how to leverage field formatters to re-use themable output on the field level, and discuss various standards around working with the theme layer. If any of that sounds a little foreign to you, don't worry, these videos will gently introduce you to each concept.

How to adjust node view modes through the user interface
Last week we talked about what view modes are, and in this video we take it a little further to explore what can be done with view modes in the Drupal user interface. (subscriber-only)

What field formatters are and how to use them to modify field output
Field formatters are a great way to modify the output of a field in a reusable way. In this video we look over the existing user interface for working with field formatters to get a feel for what they are and how you might use them in practice. (subscriber-only)

How coding standards apply to the theme layer, and how to add comments to template files
Coding standards are critical for working with other team members on a project, and in this video we look at how standards apply to the theme layer, as well as some best practices in writing comments for template files. (FREE today only!)

Template file coding standards and conventions
Template files are one of the most important interfaces between designers and developers. Here we delve into how to write template files in such a way as to make it as easy as possible for themers to make changes without having to dig into heavy development work. (FREE today only!)

How to apply CSS coding standards
The CSS standards are currently in draft status, but they can give you some tips on best practices when working with CSS, splitting CSS into multiple files, and structuring your CSS definitions. (subscriber-only)

March 6th, 2011

Last week we rolled out a nice little interface upgrade which is subtle enough that I thought it might be good to point it out with huge red arrows. With the new navigation tools, you no longer have to scroll through the (rather large) list of videos to get to the one you're looking for. Instead, just use the arrows to move forward or back, or click the list icon to display a pop-over will all the videos in the current series you're viewing, plus navigation to switch series' as well. If you're spending a lot of time on Build a Module.com, then you should notice a pleasant productivity boost.

Interface improvement with big red arrows

The new Drupal theming videos

This week we release our second batch of "Drupal Theming Essentials" videos. In this one, we tackle a couple of hairy questions about where to put the code you use to override output, discuss a couple of essential theming tools, and discuss view modes - a handy way to modify node output code-free. Enjoy!

How to decide whether to use a module or a theme for your modifications
When using a theme function to override output, is it better to put your code in a module, or in the template.php file? In this video we give you a solid answer to this sticky question. (subscriber-only)

How to decide when to use a theme function or template file
Theming functions and template files are both legitimate places to put your output-related logic, and it can be a little painful trying to figure out which one is right for what situation. In this video we provide some clear benefits to each method and match up situations to solutions. (subscriber-only)

How the theme registry works
If you don't understand what the theme registry is or how it works, you will likely find yourself banging your head against a brick wall at some point. Save yourself a metal plate in your skull and watch this succint explaination. (subscriber-only)

How to find out where any piece of output comes from
Finding out which template files or theme functions or preprocessing functions or processing functions are responsible for what kind of output where is super tricky without the Theme Developer module. In this video we dig into this module and show you how to find the origin for virtually any output in Drupal. (FREE)

What view modes are and why you would use them
View modes, previously known as "build modes" in Drupal 6, provide a rich method of consistantly displaying node content in various contexts. Plus, it wraps it all in a nice user interface for site builder types. In this video we discuss the concept of a view mode and how you'd be likely to use them. (subscriber-only)

March 1st, 2011

We're opening up the entire online video library (over 24 hours of video) for free on March 11th for the Drupalcon sprint day. If you plan on participating in any of the sprints, this is a great opportunity to have a quick visual reference library at your fingertips. If you won't be at Drupalcon, you still have full access and can use the day to build some new skills.

If you're currently a subscriber, one way you can help the sprinters is by compiling a list of the videos that have been most helpful to you and post it in your blogs or the BaM community support page. Then send me a link and I'll be sure to add a mention of it to a post that will go out sometime before the sprints. Quick tip: To get a link to a specific video, just right-click on its link on the home page and select "Copy link location".

First videos in the Drupal Theming Essentials series

This week we released the first 5 videos in the new Drupal Theming Essentials series. In this series, we're going to give you all the tools that you need to modify the output of virtually anything in Drupal, from blocks to nodes to links. More importantly, we'll help you answer some common questions like "Where do I put this modification?" or "Do I use a module or a theme for this" or "How to I hide that pesky RSS icon".

Here are some additional topics that we'll be covering over the next several weeks:

  • How to build a theme from scratch
  • The right way to modify or extend a theme
  • How to use sub-themes
  • Using template files and theming functions
  • Conceptual groundwork to get a better idea of where coding and designing end and where theming starts.
  • Lots, lots more!

And below is the list of new videos, in which we cover issues around the ambiguous nature of theming:

Who these theming videos are for and what they do (and don't) cover
In this video, we explain what these theming videos are doing on a site geared towards module building, and what we purposefully exclude in order to focus on the most common and important concepts and techniques. (FREE)

What is the difference between designing, theming and coding, and why do they overlap so much?
This video answers the question of why it is so difficult to draw a line between these different roles, and why do these roles exist in the first place. (FREE)

What are all of the different ways to modify Drupal output?
If you've ever found your head spinning as you attempt to figure out how to modify some output, it might be because there are so many possible approaches. In this video, we discuss different approaches including using CSS, installing contributed modules, and using alter functions within a module. (subscriber-only)

How to determine which method to use when modifying output
Once you're aware of the different approaches for modifying output, this video will help you answer the question of which method to chose for various situations. (subscriber-only)

A conceptual introduction to the Features module for exporting configuration options as code
In general, making output modifications with configuration changes is difficult to maintain and copy from one site to another. However, the Features module offers one solution for this, which may influence whether you take a modular or configuration-based approach to your modifications. (subscriber-only)

February 20th, 2011

Over the last two weeks, Build a Module.com has released 17 videos on how to use the File API in Drupal 7. This week we wrap the series up with 7 more videos, completing the final example where we build an image gallery with managed files completely outside of the node system. We also added a video on X-sendfile, the Apache mod that makes the private file system scream, and we open up the black box of stream wrapper code.

In addition to this release, the full collection of all 24 File API videos is also now available as a purchasable download.

How to use the EntityFieldQuery class to match certain criteria and display the results

In case you missed the previous announcements, below are the videos that are free for all visitors plus a couple that are available to mailing list subscribers:

The new videos

And below are the new videos. At this time, they're only available to subscribers, but we occasionally open up subscriber-only videos to the public for special occasions, so keep your ears out (or follow us on Twitter).

February 10th, 2011

Hot on the heels of our previous issuing of File API goodness comes 7 brand-spanking-new videos, starting with how to completely dominate unmanaged files, and wrapping up with tips on using and troubleshooting the private file system. This is good stuff!

There will be one more set of videos coming out next week to round things out, where we cover working with managed files (files with a database entry) and toss in some useful bits about improving private file performance and demystifying stream wrappers.

Here's the new videos:

February 10th, 2011

Last Friday we released a set of new videos called "Working with Files and the File API." This group of videos demonstrates some of the basics of working with files, including how to set permissions on files and folders, the difference between managed and unmanaged files in Drupal, plus a few other important bits. We begin an example to demonstrate a cohesive module using most aspects of the File API to create a gallery-style image manager, but without any nodes.

This send ends while we're working through the validation process on an unmanaged file form, and we'll continue this week and the next by building the same gallery system using managed files, and discussing a few additional topics like improving the performance of private files and diving into some stream wrapper code.

Don't let the terminology fool you into thinking this is boring stuff. Knowing how to work with files can be an extremely powerful tool in your developer toolbelt, and when you get done watching this entire series, you'll be able to easily and intelligently know what to do when you have digital assets to gather, move around or protect.

Below is a list of the new videos that were added, enjoy!

Syndicate content

Loading...