How to remove extra line breaks <br /> spacing using CSS

For some reason, you get multiple line breaks generated and causing extra, hug gaps, consider using CSS to remove these:

br:nth-child(3n + 3) {
    display: none;
}

How to hide Drupal 7 Commerce Add to Cart functionality without hacking on the code or template overrides and theme hooks

Product Display > Manage Display 

  1. Go to the Product Display (node) Display Settings
  2. Identify which Display View you want the add to cart feature disabled
    Drupal-Commerce-hide-add-cart-product-display.png
  3. Assuming "Product" is the referenced field, hide the Product reference field and hide any of the injected product attribute fields that you wouldn't want displayed. Switch from "Add to Cart" to "Hiden"

Drupal 7 slideshow gallery per node page with thumbnails optional

How to create a slideshow gallery per node or page content

Option 1: Field Slideshow and Field Collection modules

Provides a Slideshow formatter for Image fields, using JQuery Cycle plugin.Compared to Views slideshows, building the slideshow from multiple nodes, this module builds it from a single node, with a multi-valued Image/Media/Field Collection field.

https://www.drupal.org/project/field_slideshow

Drupal modules for responsive mobile-device friendly tables

Here is a list of those oftentimes necessary table modules for Drupal that works for views (list to date).

Simple Responsive Table

https://www.drupal.org/project/simple_responsive_table

Foo Table

https://www.drupal.org/project/footable

Zurb Responsive Tables

https://www.drupal.org/project/zurb_responsive_tables

Responsive Tables

Drupal 7 error on PHP 7: Fatal error: Only variables can be passed by reference in C:\xampp\htdocs\xxx\sites\all\modules\commerce\modules\cart\commerce_cart.module on line 1344

A common error on Drupal 7 running on PHP 7: Fatal error: Only variables can be passed by reference in C:\xampp\htdocs\xxx\sites\all\modules\commerce\modules\cart\commerce_cart.module on line 1344

Fixes:

How to install Owl Carousel module in Drupal 7

Drupal 7: Automatically create menu paths by heirarchy, parents to children rule

Introduction

In a previous blog post, we explained what hierarchical paths are, gave examples, and solved a problem with the pathauto module of Drupal 7 that caused certain links to contain a buggy "front" slug.

In this blog post, we will go deeper into all the issues that come with implementing a proper URL paths hierarchy in Drupal 7 and try to propose working solutions where possible.

Drupal 7: How to print content but hide certain fields in TPL template files

Normally, templates come in default by printing all content fields by:

<?php print render($content); ?>

But if for some reason, you wish to display everything, yet you need to exclude or omit certain field values from displaying, you may want to use:

<?php

hide($content['field_image']);

print render($content);

?>

In above example this will output everything by default, yet hide the image of the node.

File upload error. Could not move uploaded file.

In Drupal, in example, version 7, you need to check the following if you encounter the error: "File upload error. Could not move uploaded file."

How to insert taxonomy term description in views, Global area

You may consider using PHP for this.

  1. Go to your Views
  2. Header > Add
  3. Select Global: PHP
  4. Use PHP snippet below to display the current term description
  5. You may use additional fields as necessary, arguments, arrays, etc.
<?php $current = taxonomy_term_load(arg(2)); ?>
<?php if ($current): ?>
    <div class="taxonomy-description">
        <?php echo $current->description; ?>
    </div>
<?php endif; ?>

Pages

Recurring donation

Make Donation

  • Other: $

Donate now

Single donation

Make Donation

  • Other: $

Donate now

Navigation

User login

To prevent automated spam submissions leave this field empty.
CAPTCHA
This question is for testing whether or not you are a human visitor and to prevent automated spam submissions.
5 + 3 =
Solve this simple math problem and enter the result. E.g. for 1+3, enter 4.