You are here

Drupal 7

Order history page inaccessible for all roles except arministrator

There is a bug in Drupal Commerce concerning access to particular user order history view type page ( Path:/user/%/orders).
If there are custom roles except "administrator", even if the permission granted, the system returns "page not found" 404 error for users with custom roles.

Edit menu link in Drupal 7

For eddintg the menu links in Drupal 7, use your theme template.php file.

Add a custom function that alows you to edit all the menu link items.

Displaying number of pages showing in pager for Drupal 7 views

For displaying showing of 1-1 in views is quite tricky.

You just need to create views tpl file. I take it that you know how to create a tpl file for view in drupal 7.

I am using the views-view--viewname.tpl.php, i have list style in my tpl file.

In your tpl file just add the below links whereever you want to display the number of pages showing.


global $pager_page_array, $pager_total, $pager_limits;

Jquery $(document).ready( function() is not working in Drupal 7

Jquery document.ready function is bit different than in Drupal 6.

In Drupal 6, we simple add the document.ready function and it works like:

$(document).ready(function() {


But in Drupal 7, there are some change in the API, to make document.ready working in Drupal 7 and function before the document.ready as:

(function ($) {

$(document).ready(function() {



Display webform in a block Drupal 7 & Drupal 6

Displaying the Drupal 6 webform in a block
To display webform in a block you need to install extra module. Webform block modules provide the functionality to display form in form of block.
Download and install the webform block module from
Displaying the webform in a block for Drupal 7
To get the webform as block:
Create your webform in a node.

Customizing the primary menu links in Drupal 7

In some cases, we might to add some extra class or some extra attributes to the primary menu link in Drupal 7.

There are different ways of doing it. I have used the template.php file to customize the links. A template.php files resides inside your themes folder. Add this function to your template file and customize the links

Website fix request form

If you have problems with the website based on Drupal or WordPress, please feel free to contact us: