Srilatha Marru's Blog
Drupal Menu Block, show parent item with no children

I have been using menu block for setting the left side navigation for many of my sites and it works very well. The only problem I saw was that when a parent menu item is added with no children, the left side navigation doesn’t show up. The left side navigation shows up only when the menu item is children of a parent item or the menu item is a parent item with children.

I wanted to show left side menu block navigation for parent menu item with no children. And here is what I found from a hack on drupal forums. In the menu_block.module, comment the below lines –
/* }
else {
$data['content'] = ”;
}*/

Note: This solves your problem of displaying the parent menu item, but adds another small problem that it displays the “Main menu” title to all pages on the left sidebar. To avoid this, on your “menu block” settings page, add the below exceptions for menu block and for more pages as you see necessary.


search/*
contact-us
privacy-policy
user/*
admin/*
news/*

The menu block configuration I have set up is:
Block title as link checked.
Main Menu: Main Menu. (As I wanted left side navigation for main menu)
Starting Level: 2nd level secondary.
Fixed Parent Item: Main Menu.

Srilatha Marru's Blog
Enable multiple file upload in Drupal 7

Problem:  To add multiple file uploads to each page.

Solution:   In drupal 7 file field exists in the core modules as opposed to adding a file field withh cck in drupal 6.

  1. Enable the file field in the drupal core modules.
  2. Go to content types and manage fields and add the file field to the basic page type or article if needed.  (at admin/structure/types/manage/page/fields)
  3. Now go to file settings (click on edit for the file field).
  4. Got to “File field settings”  and select the number of values.  Select the number which will be the max number of files you will upload for a page.
  5. And save settings.

There you go and you can upload multiple files for each page in drupal.

 

Srilatha Marru's Blog
Second level url pattern with path auto Drupal

For my drupal site I am including 2nd level url pattern.   If  a page exists  ’our facilities’ exists under ‘About us’ the intended url is /about-us/our-facilities

In the path auto, url aliases, replace [node:title] with [node:menu-link:parent:title]/[node:title]

Srilatha Marru's Blog
Hide authoring information on webform for Drupal 7

I am working on adding webforms to a microsite.  The form is added but is appended with authoring information like - Submitted by User on Sun, 03/30/2008 – 13:20.” at the top of the page.

To hide the display of this authoring information:

Goto Administration > Structure > Content Types > Webform and select edit > Goto display settings tab and un check ‘Display author and date information.’

And you can get rid of the author information on your Webform.

Srilatha Marru's Blog
Drupal Drop down navigation

Ever wondered how to enable drop down navigation for the main menu in your drupal site.

Check these out:

Cute Menu
Simple menu
Nice menu
Administration menu
Dynamic persistent menu
jQuery menu
YUI menu
dhtml_menu



AUTHOR

profileWeb Developer working in advertising agency.

Recent tweets

The Twitter REST API v1 is no longer active. Please migrate to API v1.1. https://dev.twitter.com/docs/api/1.1/overview.