Sections Module: Section based on book chapter

This snippet goes in Administer -> Site Building -> Sections -> <section> -> Page Specific Visibility Settings, and allows you to specify a section based on the book chapter name. The sectioning applies to the selected chapter and all children.

Prerequisite: Sections Module

Change $chapter_name to the exact name of the book chapter that you want to be the start of the new section.
Change $chapter_level to the chapter level to check at. Level 0 may work, but is untested.

How the levels are counted by this snippet:

Book Title (level 0)
-- Chapter 1 (level 1)
---- Chapter 1.1 (level 2)
------ Chapter 1.1.1 (level 3)
------ Chapter 1.1.2 (level 3)
------ Chapter 1.1.3 (level 3)
---- Chapter 1.2 (level 2)
------ Chapter 1.2.1 (level 3)
------ Chapter 1.2.2 (level 3)
-- Chapter 2 (level 1)
---- Chapter 2.1 (level 2)
------ Chapter 2.1.1 (level 3)
------ Chapter 2.1.2 (level 3)
------ Chapter 2.1.3 (level 3)
---- Chapter 2.2 (level 2)
------ Chapter 2.2.1 (level 3)
------ Chapter 2.2.2 (level 3)

Why? Well, I wanted to set different themes for different book chapters, but any module that uses the Sections Module should be able to work with this.

$chapter_name = "Chapter 1"; $chapter_level = 1;
$match = FALSE;


Here is a cookbook of useful tips and ideas for specialized applications - feel free to add your own Migrate V2 tricks!

Using views menu with path aliases

What I wanted to achieve
Basically I wanted to add a Tab for a content type song that pointed to a view to report all the reviews for that song, all that using nice auto-aliased urls.

Drupal Git Repository Usage policy

Read me first


This is a free service provided by the Drupal developers for the Drupal community. By using the repository you agree to the terms of services (see below).

All files checked into the repository (code and assets) must be licensed under GNU/GPL version 2 and later. If there is a problem with this, contact the repository administrators.

Always make sure there isn't already contributed code that does the same thing as your code. Instead, contact the maintainer of the other project and try to merge the projects into one.

Do not branch/"fork" Drupal modules/themes; instead, make patches and submit those for review. In case a patch is not approved, or very unlikely to be approved, contact the administrators of the contributions repository for advice.

DO NOT include code from a non-Drupal project in the repository. If your module requires non-Drupal code, such as a third-party JavaScript/PHP library, provide a link to where the other code can be downloaded and instructions on how to install it.

All code should comply to the coding standards. Any patch that fails to do this will generally be treated as unfinished work.

Drupal Contributions Repository - Terms of service

Clean URLs with NGINX

No particular setting is needed (anymore), but read about the recommended settings for Drupal in general on the Nginx wiki.


Documentation for the AudioField module.


Install and enable the Audiofield module in the usual way. Learn about installing Drupal modules.


Configure the audiofield at Administration > Configuration > Media ( For Drupal 6 that is You can choose the default player and set the folder where the module can find the players. The player you select will be used as default player for all audio files.

Add an audio field to the content type

You can add an audiofield to any entity (content type, user, taxonomy et cetera).

  • Add a field via the Manage fields tabS
  • Select field type "File"
  • Select widget "Audio Upload"

If you need further help managing fields read more about fields in Drupal.


  1. Audiofield's default is Google Reader MP3 Player CURRENTLY BROKEN [#2033375‎]
  2. The Standalone WordPress player. Make sure you download the standalone edition


Subscribe with RSS Subscribe to RSS - Needs copy/style review