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.
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:
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.
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.
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.
There are several ways to insert blocks onto a page with Drupal. You can use panels, you can add a region to the theme, or you can call the blocks programmatically with php. Though it might not seem evident at first there are some situations where it really is much easier, or better just to call a block with php rather than using the other options. One good example is where you want to add a particular block to a page that shows up in an odd location (such as the top right hand corner of the page) where panels can’t get to.
Drupal blocks can be themed on several levels. You can create a custom html layout for all the blocks on your site, you can create a different layout for a specific region on your site, you can customize the blocks according to the module that created the blocks, or you can even theme an individual block with its own unique html and corresponding CSS styles.
Drupal is made to be customized; however some parts of Drupal theming don’t have much documentation written about them. Theming the search form is a good example. I don’t know if someone has added a tutorial in the last couple of months, but when I made the switch from Drupal 5 to Drupal 6 I couldn’t find a tutorial anywhere that explained how to do it, and the function that I had used for Drupal 5 was no longer working. So I tinkered with it a little, and after a bit of trial and error I came up with a method that works.