Categories
Drupal Development Resources

Building Drupal sites with Bootstrap: Responsive Carousels with Views

We recently relaunched ItaloAmericano.org with a new theme based on Bootstrap. One of our goals was to minimize the need for additional modules and javascript packages, since Bootstrap comes with just about everything we need. A feature used throughout the site is a responsive carousel of featured articles for each of the main categories. The […]

Categories
WordPress

Custom base.php file with Roots Theme

Photo Credit I talk a lot about the Roots theme. It’s our favorite starter theme and comes with our favorite responsive framework. Roots come with its own theme wrapper which makes it a little difficult to understand for people new to WordPress. The base.php takes the place of the usual index.php file in a WordPress […]

Categories
Drupal Development Resources

Tutorial: IE8 Support for Drupal Bootstrap theme

Drupal Bootstrap theme does not support IE8 by default. IE8 does not understand HTML5-specific markup and CSS3 media queries. Without support for HTML5 and media queries, you will only see the “mobile” view when you load a Bootstrap theme in IE8. You’ll need to add support for these two features yourself. If you need to […]

Categories
WordPress

How to insert an ad between posts in WordPress

Does your project call for you to insert an ad, graphic, or some other type of content between posts? If so, there’s a very easy solution. A typical loop looks like this, taken from the twentyfourteen theme: if ( have_posts() ) : while ( have_posts() ) : the_post(); get_template_part( ‘content’, get_post_format() ); endwhile; else : get_template_part( ‘content’, ‘none’ […]

Categories
Drupal Development Resources

Tutorial: Drupal Bootstrap Subtheme with LESS

An updated guide is available! See Drupal Bootstrap 3.4 Instructions Bootstrap is our favorite starter theme for Drupal 7. However, the documentation is a little out of date and incomplete for Bootstrap 3.1.x and newer. The template files are also in an unusual place, making getting started with the subtheme trickier than it needs to be. […]

Categories
Drupal Development Resources WordPress

Common Bootstrap Customizations

The latest version of Bootstrap 3.x has some great UI features out of the box, but you’ll have to customize it to really make it your own. You can override the Bootstrap CSS with your own, but it’s so much easier to make small edits to the source LESS files and then compile them into […]

Categories
Drupal Development Resources WordPress

Multilevel dropdown menus with Bootstrap 3.x

Bootstrap 3.0 and newer no longer supports multiple tier dropdowns for navigation bars. This snippet of jquery prevents Bootstrap from toggling the “open” classes when you go past the first dropdown. No additional CSS or markup required! /** * NAME: Bootstrap 3 Triple Nested Sub-Menus * This script will active Triple level multi drop-down menus in Bootstrap […]

Categories
Drupal Development Resources

Undoing Drupal Bootstrap theme’s rewriting of buttons

Drupal Bootstrap replaces instances of input type=”submit” into buttons by default. This occasionally breaks other module functionality such as hierarchical select module. Rather than hack the bootstrap module we can declare our own theme_button() call in template.php which would override bootstrap’s bootstrap_button() modification. Enter this in your subtheme’s template.php file and update “YOURTHEME” to your […]

Categories
Drupal Development Resources

Drupal 7 Ubercart 3 Disable cart change quantity field

There may be some instances where you may not want your users to change their quantity on the cart page. An example may be where you want to limit an item to one per order. There are many ways to limit in the product’s node page, but the cart page presents a loophole where the […]

Categories
Drupal Development Resources

Mapping CSS styles with LESS

Ever have a situation where adding a class or ID to your HTML markup is difficult? This is a common occurrence when working with content management systems or modules/plugins where the code is generated for you. A perfect example is Drupal, where adding classes often requires either writing a custom module to override the output, […]