Community Documentation

A guide to adding your own snippets

Last updated August 17, 2009. Created by Dublin Drupaller on January 19, 2006.
Edited by ronald_istos, NonProfit, bryan kennedy, LeeHunter. Log in to edit this page.

When submitting a snippet, please follow these guidelines:

  1. Keep your handbook snippet page as clear and as brief as possible
  2. Ensure you test the snippet and tag your page with the appropriate version(s) of Drupal
  3. Categorize your snippets. For example, put blog-related snippets as a CHILD PAGE to the Customizing the blogs layout page instead of having all the snippets on the same page which will make it more difficult as more snippets are added
  4. Copy the template snippet below into your clipboard
  5. Go to the main PHPTEMPLATE THEME SNIPPETS PAGE
  6. Scroll down to the bottom and click on ADD CHILD PAGE
  7. Contact Dublin Drupaller if you have any questions or have submitted a page and would like it approved.

Description

Type a very brief description of your snippet here.

Step 1 of 2

Outline what this step is about here.

<h2>Description</h2>
Type a very brief description of your snippet here.

<h3>Step 1 of 2</h3>

Outline what this step is about here.

<?php
/**
* insert your snippet here
  */
?>

Step 2 of 2

Insert an introduction to a second step if required.

Outline what this step is about here.

<h3>Step 2 of 2</h3>

Insert an introduction to a second step if required.

Outline what this step is about here.

<?php
/**
* insert your snippet here
  */
?>

Notes

  • Insert notes to help users using the snippet
  • Link to a forum thread where a discussion related to the snippet is ongoing.
  • Include any dependencies, such as a specific module that needs to be enabled first.

<h3>Notes</h3>

<ul><li>Insert notes to help and aid users using the snippet</li>
<li>Link to a forum thread where a discussion related to the snippet is ongoing.</li>
<li>Include any dependencies, such as a specific module that needs to be enabled first.</li>
</ul>

About this page

Drupal version
Drupal 4.5.x or older, Drupal 4.6.x, Drupal 4.7.x

Theming Guide

Drupal’s online documentation is © 2000-2013 by the individual contributors and can be used in accordance with the Creative Commons License, Attribution-ShareAlike 2.0. PHP code is distributed under the GNU General Public License. Comments on documentation pages are used to improve content and then deleted.