Language
  • English
  • Français
Drupal custom theming or module development price estimate calculator

Drupal Tutorials

How to create a custom template file for a form with Zen subthemes

There are two stages of understanding needed in order to create a template file for a form in a Zen subtheme. The first level in my opinion is to understand how to achieve that same result in a normal theme.

In a normal theme all we need to know in order to create a working tpl (template file) for a form is the form id in question and the format to connect that form to the tpl from within the template.php file.

Official Documentation for the JQuery Menu API

This document is intended for module developers who wish to make use of JQuery to process an array of hierarchical data into a click and expand menu. It is written with the assumption that you are a programmer and that you know how to create multidimensional arrays through recursive functions.
The only function that third party modules need to call from JQuery menu in order to create a click and expand menu is as follows:

theme('menu_creation_by_array', $menutree, $trail);

This calls the theme function menu_creation_by_array() and sends it two arguments:

3 Responses | READ MORE

How to show all nodes tagged with children terms with Views 2 for Drupal 6

The Views module for Drupal 6 (also known as Views 2) ships with several default views which allow you to override certain Drupal core list pages. One of the most useful of these views is the view provided for taxonomy term list. Just recently I decided to set up views to override my taxonomy pages so that they would show children terms, but when I jumped into the Views 2 interface and tried to actually do it I was left a little perplexed; if you are reading this page you probably were too.

7 Responses | READ MORE

How to programmatically insert a view into a tpl or content in Drupal 6

In Drupal 6 views has been completely rewritten from the ground up, and as such we have to adjust the little code snippets that we developers have collected over the years to compensate.

The old way ( Drupal 5 views 1 ) of inserting a view into a tpl or into a php enabled content area was as follows:

<?php
$view_name = 'text_listing'; //name of view
$view_args = array($oldstring) ;
$view = views_get_view($view_name);
print views_build_view('embed', $view, $view_args, $view->use_pager, $view->nodes_per_page);
?>

This has now changed to the following:

<?php
  $view_args = array();
  $display_id = 'page_1';
  $view = views_get_view('logo_slideshow');
       if (!empty($view)) {
        print $view->execute_display($display_id , $view_args);
  }
?>

How to add menus and links to your Drupal 6 website

Once you’ve created a page for your site you are probably going to want to add a link to that page at some point. If you had a Drupal developer like myself build your site then you probably already have a couple of menus in place already, but what happens if you want to add a new one?

Well, you can call me and have me do it, but in my opinion that would an expensive option especially since Drupal 6 makes it extremely easy to do yourself.

How to find and manage existing content on your Drupal Site

One of the first questions people ask me after I show them how to create a page in Drupal is “So where is the page now?”. It’s a simple question but the real answer is a little bit difficult for laymen to grasp at first. You see Drupal doesn’t create new files when it creates a new page, so the page doesn’t exist in a folder on the server where you could go download it as is true with some other content management systems. Drupal stores the information to create the page that you see by storing the necessary information in several places in the database.

How and why to use the l() function to create links in Drupal programming

If you have been doing web development for any significant amount of time chances are you know how to build a link by hand using the 'a href="link/to/some/page"' syntax. That method works fine and can even be used inside of Drupal modules, but it is generally frowned upon by the Drupal community. Using the l() function is the Drupal way of building links programmatically, and though it might take some getting used to, in the end you will find that it saves time.

l() is a function that is available anywhere within a Drupal installation. It accepts three arguments:

How to use the Webform module to create custom forms for your Drupal Website

The Drupal Webform module by Nathan Haug aka “quicksketch” is in my book rates up there in the top ten most important Drupal modules in existence and it’s not that hard to use once you understand how it works. This is a brief tutorial designed to help people get a handle on the Webform module quickly so they can start using it to add web forms to their website. Note: This tutorial is written in the context of Drupal 6. There may be minor differences for Drupal 5 installations.

How to use Taxonomy to classify your pages in Drupal

Taxonomy is not a common word to hear in the English language, so chances are if you haven’t dedicated your life to studying the mating habits of African dung beetles or tinkering with Drupal then you may not have even heard the word before. Taxonomy refers to a system of classification used to group similar items. In Drupal Taxonomy is used to group your pages by the subject matter or by other criteria so that they can later be sorted into page listings (using the Views module) or manipulated in some other fashion.

How to add content to your Drupal website

Adding a new page to a Drupal website is probably the easiest thing you can do in Drupal, none the less there are a couple of important things to be aware of so I am writing this to help beginners understand.

Ask a question related to Drupal development or administration