AdaptiveThemes Blog

Drupal 8 Page Manager

Tim Plunkett recently created a new project for Drupal 8 - Page Manager, which looks set to be the replacement for what was the Page Manager module in CTools from D7.

From the project page:

Seasons, Vibrant and Timeout Coming Soon

This is just a quick update to clarify the situation with our AT Seasons, AT Vibrant and AT Timeout themes.

These themes are being spruced up and the demo sites finalised before we add them back to the site. This should happen in the next week or so.

Seasons and Timeout are very close to release (this week) with Vibrant still needing extra testing and configuration of the demo site, then it's good to go early next week.

How to add xmlns attribute for Facebook in Adaptivetheme

This is a "how to" article which describes how to add the Facebook xmlns:fb attribute to the html element.

Normally you would probably hard code something like this in html.tpl.php, however in Adaptivetheme we can push this into a variable in preprocess, thus removing the requirement for a template override and making this a two second copy'n'paste sort of thing.

Hide or Show Drupal Blocks in Mobile

As an adjunct to my recent spate of supporting mobile device contexts using Browscap, and as a compliment to the recently released Browscap CTools module, I knocked out a similar module for hiding and showing Drupal blocks in mobile - Browscap Block.

This module leverages Browscap for device detection and requires it as a dependency.

Social Network Links with Drupal 7, Views and Link

Recently I thought about building a social networking module that allowed you to upload an icon, paste in your link and voil?? - instant social network links in a block.

Turns out there already exists a few modules in this space and to be frank I don't think we really need yet another Drupal social networking module. However none of the modules really suited my requirments so I turned to Drupal core fields and Views to see if I could build this with no code and just a bit of configuration.

OK, so the requirements for this are pretty simple:

Move or hide regions and blocks in mobile devices

Most of us are painfully aware that Mobile Tools is not ready for Drupal 7 at this time, which leaves us kind of stuck for a general solution for controlling region and block visibility in mobile browsers. After the 476'th feature/support request for this in Adaptivetheme 7.x-3.x I finally relented and at the eleventh hour (its about to be released as stable), I added these features, and more, to be precise.

OK, in a nutshell, you can (via theme settings)...

Adaptivetheme Responsive Layouts - Quickfire Video Intro

Adaptivetheme 7.x-2.x includes a new layout engine that drives both responsive and adaptive layouts using media queries. We've made it super easy to configure layouts for standard desktops and laptops, and tablet and smartphone size screens. This video features Pixture Reloaded, an Adaptivetheme subtheme available for free download on and shows off the layout settings and a brief run down on how it all works.

How to add CSS files in Drupal 7

I get asked all the time how to add a CSS file to Drupal, its seems like the most rudimentary thing to do in a modern website, however Drupal has more than one way to add CSS files so here's an in depth explanation of the different ways you can add your files and why you might choose a particular method.

Theme Documentation Sprint for May

The docs team have spotlighted Drupal 7 theme documentation for May, you can read all about it here:

The docs seriously need work so anyone with theming experience who can give a couple of hours some time during May to help out would be fantastic - I know I'll do my best to help improve the docs, so please get involved.

สมัคร gclubDrupal 8 Design Initiative

Way back in September 2010 I launched the Design 4 Drupal Core (D4DC) project - the initial goal was to define a better process for adding new themes to Drupal core. This grew out of the Drupal 7 process which was essentially a code race between Bartik and Corolla. It was clear to me this process could be improved. In the commercial world we always select the design first (as opposed to an entire theme), so I started making the argument that any new core theme would have to be selected based on the design - then coded into theme.

HTML5 Placeholder text for your Drupal 7 Search Field

HTML5 has a bunch of new form attributes and one of these can neatly add placeholder text to text inputs, such as your search input field. This text will be removed when the search field is focused, so in effect acts like ye ole JS solutions we've all been using for eons.

Browser support for placeholder looks pretty good, I have it working in Opera 11 and FF4. It should be widely supported in all the next generation browsers.

Are blocks section or div, an HTML5 conumdrum

This debate is going to rear its head in the Drupal community sooner rather than later because right now we're seriously thinking about HTML5 for Drupal 8, and because many new HTML5 themes are springing up.

The issue is that <section> elements must have a heading, that is an <h*> element. If they don't have a heading then technically they're not a section. This is problematic for Drupal blocks because headings are optional, even end users can toggle the display of the block heading.

Using HTML5 figure & figcaption elements to markup Image fields in Drupal 7

I've been reading up about the figure and figcaption elements for HTML5 over at the HTML5 Doctor and other places and thought I'd use these new elements to create captioned images in Drupal 7.

This is actually so easy its not funny, in fact you only need to make one configuration change to your image field and add one template override and you're done.

First - edit your image field settings and check the option to Enable Title field. We're going to re-use the title field to add our captions.