Just another WordPress weblog by a Drupal Developer
Couple of things I learned while creating sites in Drupal
I am now creating my 5-th site in Drupal, three of them being pretty big and totally custom. So using a free or even premium theme was not an option. Each section of the site looked so much different that if i would cover logo and name of the site, you would probably think twice before saying thats its the same site. Obviously i made a lot of mistakes, but as they say “The best way to learn is from your mistakes”. So let me share with you some of my mistakes and what i learned from them, plus some of the modules that i found really useful.
Starter Theme
Start with free blueprint theme this will give you a starting point so that you will have all the elements on the page but without actually having any design, so that when you start putting in your design you don’t have to fight with legacy code from the theme.
Admin
Next very important step is going to be to install Admin Menu. This module is so important that it was included in core of Drupal 7.
Javascript
As i mentioned earlier the sites i was working on were very custom they were using: jQuery, Cufon, Accordion, Ajax, Thickbox, In-Field Labels… The version of jQuery that comes prepackaged with Drupal is old. So what i did is just put the latest version in the theme… I got it to work but not without having multiple versions of jQuery being included on every page, which in turn forced me to use “jQuery no conflict mode”. Even though we got it to work eventually, every time you add any module that uses jQuery i have to go through the javascript and substitute “$” sign with “jQuery”. So obviously there must be a better way. An indeed there is, what i could, and should, have done is install jQuery Update module, which would update the version in a “Drupal” way. Also there is a jQuery UI Module which contains:
- Accordion
- Datepicker
- Dialog
- Progressbar
- Slider
- Tabs
There is also a Cufon Module, Thickbox Module etc. So whatever you trying to do try to find a Drupal way of doing it.
Theming the site
There are few must have tools (Modules) in this area. You will need Devel Module to see whats going on under the hood of your drupal site what templates and what functions are used and which names you could use to override those. Another module that i find myself using a lot is Views. I use it for two entirely different purposes, one to create a custom block or a page. Another use is not so “Drupal”, sometimes you have no other choice but to stick in a SQL query into your theme, but the problem you will encounter is Drupal is so flexible and generic that sometimes to get one entry from the database you will need to connect and join three, four or even five tables, so to write the SQL query by hand will take you a while, here is where my second use of Views comes into play, there is an option to show you the SQL query the view runs while generating content you requested, so you could just copy it and stick it into your theme.
Other Modules i use:
- Token – Used mostly by other modules
- imageapi – Used by other modules
- Disqus – substitutes the default comment system with the one from Disqus which lets your readers comment by login in with their Twitter, Facebook login or others, plus it lets you have the conversation all across the web, i find it truly amazing.
- CCK – Lets you add custom fields aside from title and body
- filefield – File type of CCK Field
- imagefield – Image type of CCK Field
- imagecache – Lets you show the same image in variety of sizes, based on presets
- Poormanscron – runs the cron jobs for you (will be included in core of Drupal 7)
- pathauto – automatically generates aliases
- globalredirect – makes sure that node/10 takes you to node10alias, so that there is only one URL to unique content
- webform – If you are planning to have any forms on your site
- webformblock – If you want to show the form in a block, versus a whole page
As i continue to make more mistakes (read learn) i will continue to share more lessons i learned. If there is anything you would like to share or ask, feel free to do so in the comments.
If you liked this post you might want to read the part 2.
Related articles by Zemanta
- How to add a custom login box into your Drupal theme (lichtman.ca)
| Print article | This entry was posted by admin on December 29, 2009 at 2:57 pm, and is filed under Drupal. Follow any responses to this post through RSS 2.0. You can leave a response or trackback from your own site. |
![Reblog this post [with Zemanta]](http://img.zemanta.com/reblog_e.png?x-id=aac6718d-bdde-442f-a025-abfc3398c727)


about 8 months ago
Nice to see you're up and blogging on your own now! Nice article too – looking forward to reading more.
about 8 months ago
Thanks, hope not to disappoint you