- Getting Started
- Basic Configuration
- Creating Multiple Sites On Your Local Computer
- Error Pages
- Accessing Your Test Site(s)
- Adding Modules and Themes
- Creating Content
- Custom Blocks
- Working with the Menu
- The Contact Form
- URL Aliases
- Moving Entire Drupal Site with Databases
- Moving Stuff to Your Web Site
- Setting Up Cron
- Additional Tips and Tricks
- Categories (Taxonomy)
- Common Problems
- Links and IMG
- Keeping Your Local and Remote Sites Synchronized
- More Reading
- Glossary
Drupal Cookbook
Submitted on Thu, 02/08/2007 - 04:02.
Using the Drupal
Drupal
Purpose
I am one of the many DrupalDrupal
An open-source content management system that is used on this site and is taking over the world. "newbies" who seemed overwhelmed at first. Well, I still am. But I have learned a lot in my first month with DrupalDrupal
An open-source content management system that is used on this site and is taking over the world.. I'm even answering question in the forums (actually, I think it's fora.)
With some encouragement from other newbies, I decided to start on writing down what I'm doing to build my sites. (Shoot, at my age, I can't rely on my memory, I have to write it down.) Yes, that's plural. As of this writing I have three sites in production, plus a test siteA logically grouped set of content - also web site. for playing around.
Background
The basis of this book is going to be my efforts to build new test sites on my PC, running Windows. Hopefully by the time I get to that point in this book, I'll have figured out how to transfer the developed sites onto the remote production servers. Pretty much all of this is directly appicable to building a siteA logically grouped set of content - also web site. directly on a web server.
Myths
It is a pure myth that you have to know how to program (especially in phpRecursive acronym for "PHP: Hypertext Preprocessor" - is a widely-used Open Source general-purpose scripting language that is especially suited for Web development and can be embedded into HTML.) to use DrupalDrupal
An open-source content management system that is used on this site and is taking over the world.. It doesn't hurt to have some basic knowledge of phpRecursive acronym for "PHP: Hypertext Preprocessor" - is a widely-used Open Source general-purpose scripting language that is especially suited for Web development and can be embedded into HTML., HTMLHyperText Markup Language - the coding standard for a web page., and CSS, but it is not required. Here are some good resources for you:
- W3 Schools - for virtually everything Internet-related.
- The Official PHP Site - the full phpRecursive acronym for "PHP: Hypertext Preprocessor" - is a widely-used Open Source general-purpose scripting language that is especially suited for Web development and can be embedded into HTML. implementation.
- PHP Builder - some tutorials and code ready-to-use.
- PHP Freaks - references, tutorials, and code ready-to-use.
Now, to be honest, I have used HTMLHyperText Markup Language - the coding standard for a web page. in this book, and tweaked the CSSCascading Style Sheet - a hierarchical means of specifying how to format HTML elements on the page on my siteA logically grouped set of content - also web site. a little bit. But I have not used one line of phpRecursive acronym for "PHP: Hypertext Preprocessor" - is a widely-used Open Source general-purpose scripting language that is especially suited for Web development and can be embedded into HTML. code.
Another common myth is that your learning curve for DrupalDrupal
An open-source content management system that is used on this site and is taking over the world. is going to be steep and it will take you months, or even years, to get a web siteA logically grouped set of content - also web site. up and running. Hogwash! I had my first, largely static, web siteA logically grouped set of content - also web site. with 36 pages up in less than a week after I installed my first copy of DrupalDrupal
An open-source content management system that is used on this site and is taking over the world.. Then, because my hosting provider pulled the plug, I got my group's siteA logically grouped set of content - also web site. up in the time it took to get the domain name transferred (about 5 days). That was after about 16 days from starting with DrupalDrupal
An open-source content management system that is used on this site and is taking over the world.. That siteA logically grouped set of content - also web site. had a lot of static content, but also required a taxonomy-based access control moduleAn add-on, or extension, to Drupal to provide additional functionality; written in PHP., a fancier themeFor web sites, this refers to the "look and feel" of the site. It is also used to describe the code to produce that look., meta tags, photo albums, and a calendar - and it all had to work right away!
You can do it! Yes, YOU.
Using the DrupalDrupal
An open-source content management system that is used on this site and is taking over the world. Web SiteA logically grouped set of content - also web site.
There are a few things you need to know before you post anything on the DrupalDrupal
An open-source content management system that is used on this site and is taking over the world. web siteA logically grouped set of content - also web site.:
- Search to see if the subject has already been covered. If it has, then recreating the subject will probably get you negative comments. If you don't understand the responses (I certainly identify with that feeling), don't hesitate to say "I'm a newbie, can you say this in easier to understand terms?"
- You need to get a few basic terms right or you will be flamed.
- Node: This is, in simple terms, a unit your content. It may, for example, be a "page," "story," "book page," or "blog entry."
- ThemeFor web sites, this refers to the "look and feel" of the site. It is also used to describe the code to produce that look.: This is the way your siteA logically grouped set of content - also web site. is displayed (or rendered) to the end-user.
- Block: This is a "container" for pieces of content on your displayed page. For example, your navigation menu and log-in are blocks. You may also have "Recent posts," "Sponsor links," or "Who's online."
- Try to completely describe the situation. For example, if a page is not showing up correctly, it could be a browser problem, so make sure you tell the reader what browser you're using. Always mention which release of Drupal
Drupal
An open-source content management system that is used on this site and is taking over the world. you're using (4.7.x, 5.x, etc).
Typing Convention
Throughout this siteA logically grouped set of content - also web site., as well as the DrupalDrupal
An open-source content management system that is used on this site and is taking over the world. siteA logically grouped set of content - also web site., you will see things like Administer>>Access control>>User management>>Roles. This means click on "Administer" in the navigation menu, then "Access control," then "User management," and then "Roles."
I will occasionally refer to "production" or "live" sites. These terms are pretty much interchangeable. The latter term is more modern and accepted in reference to web sites and means the siteA logically grouped set of content - also web site. that your end-users interact with. The former term is largely synonymous but is a more "traditional" data processing term.
Some Preliminary Advice
This is from a post by ebrad on March 26, 2007, with some minor editing.
I don't know if I could call my sites "great;" it's taken about 9 months to really get a good understanding of how to use DrupalDrupal
An open-source content management system that is used on this site and is taking over the world. and its modules. This doesn't include learning the API or writing my own modules.
These are some recommendations I would have given myself before I began with DrupalDrupal
An open-source content management system that is used on this site and is taking over the world.:
- Never try anything for the first time on a live siteA logically grouped set of content - also web site.. Use a test siteA logically grouped set of content - also web site. that uses the same modules and same data (different databaseA collection of data related to an application.). I keep 2 tests sites going at all times.
- Don't try to make the "perfect siteA logically grouped set of content - also web site." on your first shot. Muddle through for a while until you understand a better way. Stressing over the perfect solution will slow you down.
- Stay away from Views, Category, CCKContent Construction Kit - a Drupal module that allows you to create new content types, and Organic Groups modules until you at least have a little experience under your belt. These modules require a good bit of understanding to master and it might discourage you if you try to dive in too fast. However, over time you will come to realize that these are some of the most powerful and flexible modules out there. [Nancy's note: also stay away from access control (security) modules until later. They can really destroy your siteA logically grouped set of content - also web site. if you don't know what you're doing.]
- Customize one of the default themes before creating your own, the Theme Developer's Guide in the handbook is a big help.
- When you run into a problem with a moduleAn add-on, or extension, to Drupal to provide additional functionality; written in PHP., make sure to read the "readme," then do several searches with different terms, only rarely have my problems not already been answered in the forums or in an issues queue.
- To make a siteA logically grouped set of content - also web site. really successful, make it work for the users, not against them. Once you have the basic siteA logically grouped set of content - also web site. set up, get your friends, family, or anyone who will talk to you to look at your siteA logically grouped set of content - also web site. and give honest feedback, or do user testing for a more formal approach (I run a company Intranet and I do user testing every couple of months).
- Help out in the forums when you can. It's surprising how explaining something to someone else helps you understand it yourself.
- Go easy on what I call "gadgets" such as useless blocks, images, and graphics that clutter the page. I prefer simplicity and I only place something on the page if it is needed. This of course depends on your application
Good Luck!
DrupalDrupal
An open-source content management system that is used on this site and is taking over the world. Is Supposed to be Easy?
DrupalDrupal
An open-source content management system that is used on this site and is taking over the world. is very powerful and flexible. That means it must have a significant degree of complexity. Do you think the folks at Myspace don't have their terminology or managed to roll out that siteA logically grouped set of content - also web site. in a day? I don't know who told you DrupalDrupal
An open-source content management system that is used on this site and is taking over the world. was easy, but many people make it harder than it has to be by thinking they need to understand everything at once.
Terminology is necessary in order to properly convey what one is trying to say or ask. If you talk about "that box-like thingy on the right side of my screen" you could be referring to many things. Contrast that with "the Author Information block in the right sidebar" - now you are precise and everyone knows exactly what you mean. You've told them what it is, where it is, and even how it got there and part of how you've styled it.
Start by trying to understand the basic parts of DrupalDrupal
An open-source content management system that is used on this site and is taking over the world., don't try to understand everything at once. For example, it is imperative that you know what a node is (look in my book). Then understand what content types are. Learn the basic parts of the rendered page (header, footer, left and right sidebars, and the center, or content areas). Check out the administration pages so you have some idea where things are, even if you don't understand them all today.
It's all fine and good to have "Myspace" as your target, but you are one person with a new tool. The people that put that together are many and using tools that they already were familiar with. (BTW, I find Myspace to be rather illogical.)
Just start by getting something up and visible. Then celebrate that you've done that. Now you're ready to move on to more wonderful things, but do it one step at a time. Don't add tons of modules right away; get comfortable with what you have. Add modules one at a time and get familiar with them - one at a time.
As for making DrupalDrupal
An open-source content management system that is used on this site and is taking over the world. easier and more logical, you're welcome to submit feature requests or explain why something is not done in the most logical manner. But don't demand it, or threaten to abandon DrupalDrupal
An open-source content management system that is used on this site and is taking over the world. if you don't get it your way. And certainly don't resort to name calling or derogatory comments.


Am I barking up the right tree?
I'm looking at CMSs for a professional organization to upgrade its siteA logically grouped set of content - also web site. from a static siteA logically grouped set of content - also web site. to more of a community-based siteA logically grouped set of content - also web site.. I'm only on day 2 of looking at this upgrade after pretty much retiring from SW development about 5 years ago. I'm zeroing in on Drupal
Drupal
An open-source content management system that is used on this site and is taking over the world. and Dolphin after having also considered Joomla and Wordpress.I'd like your sense of how appropriate Drupal
Drupal
An open-source content management system that is used on this site and is taking over the world. is to the ideas I'm about to outline and to get some idea of whether these ideas are likely to require significant custom coding.I imagine the front page to have a few teasers for publicly available articles on mission, history, membership requirements, upcoming events, and the organization's nomenklatura. Seeing the rest of the siteA logically grouped set of content - also web site. would require login by members registered not merely as siteA logically grouped set of content - also web site. members but as members of the organization itself. (So registration would either be done by an administrator or approved by an administrator.) It would include forums, lists of members, a profile page for each member, and a few blocks (if I've understand the term correctly) reserved for regular columns by specific individuals. My impression is that Drupal
Drupal
An open-source content management system that is used on this site and is taking over the world. does that out of the box, except maybe for the profile page for each member.Do it sound like Drupal
Drupal
An open-source content management system that is used on this site and is taking over the world. is the right direction to go? Do you think it's the shortest path?Is it a big deal to constrain a user's editing privileges to specific blocks or articles? Some of these people are good writers and in some cases experienced forum users, but if they have to access the article from a list that is disembodied from its screen context, that may be asking too much. I'd want the users in question to initiate their edit or addition directly from an instance of the block in question.
I used to do a reasonable amount of PHPRecursive acronym for "PHP: Hypertext Preprocessor" - is a widely-used Open Source general-purpose scripting language that is especially suited for Web development and can be embedded into HTML. but I haven't decided whether I'd want to do the implementation myself or act as a contract manager for the organization. Either way there might be some contracting or consulting for you here, though we're still weighing a variety of options.
Hmm...
You're right, Drupal
Drupal
An open-source content management system that is used on this site and is taking over the world. does that first stuff out of the box.Profile pages, as I understand your needs, are a combination of two things. First the core Profile moduleAn add-on, or extension, to Drupal to provide additional functionality; written in PHP. lets you add fields as desired to to the user's profile. (For more complex needs, there are contributed modules.) The other part you may want is theming the profile page so that the pieces come together in one spot. This is not difficult and there are several articles on the Drupal
Drupal
An open-source content management system that is used on this site and is taking over the world..org (DO) web siteA logically grouped set of content - also web site. about it. Those things you don't want are not there in DrupalDrupal
An open-source content management system that is used on this site and is taking over the world. - although they can be added.Searching for other members by location should be do-able with the Location contributed moduleAn add-on, or extension, to Drupal to provide additional functionality; written in PHP. and maybe just a tad of custom code (which is probably posted on DO somewhere.)
Access to blocks can be restricted on a block-by-block basis by role. Access to specific articles may need one of the access control modules (there are several to choose from - I use TAC_Lite).
I think what you call groups can be done with roles. I believe (I'm not a big forum user) that forums may be controlled by role, as most things in Drupal
Drupal
An open-source content management system that is used on this site and is taking over the world. can.While Drupal
Drupal
An open-source content management system that is used on this site and is taking over the world. may be extended with PHPRecursive acronym for "PHP: Hypertext Preprocessor" - is a widely-used Open Source general-purpose scripting language that is especially suited for Web development and can be embedded into HTML., HTMLHyperText Markup Language - the coding standard for a web page., and CSSCascading Style Sheet - a hierarchical means of specifying how to format HTML elements on the page, many users find they need none of that. You didn't mention WYSIWYG editors, but those are also available.Thanks, I'll proceed
Thanks, I'll proceed in the Drupal
Drupal
An open-source content management system that is used on this site and is taking over the world. direction, then. I've got v5 and v6 running locally at the moment.First thing will be just to mess around enough to learn the lay of the land, then try out some customizations. After that I'll be in more of a position to decide how to get the real work done.
Php Syntax
Nancy,
I am very new to Drupal
Drupal
An open-source content management system that is used on this site and is taking over the world. and am trying to learn it.Can you tell me what the notation -> means in phpRecursive acronym for "PHP: Hypertext Preprocessor" - is a widely-used Open Source general-purpose scripting language that is especially suited for Web development and can be embedded into HTML. code?
I have tried my best to find it but this is probably so basic and I am not able to.
tania
Object
That identifies a "method" (the part on the right) of an object (the part on the left). For example "$node->nid" means the node identifier method of the $node object.
php Syntax
Thank you so much.
This is very helpful!
Tania
Thanks!
Hi: Greetings from Peru!
Thanks for your work here.... I am trying to set up a siteA logically grouped set of content - also web site. with Drupal
Drupal
An open-source content management system that is used on this site and is taking over the world. being a newby. I found your siteA logically grouped set of content - also web site. very usefull :-)I am adding this page to my favorite links!
Cesar
thanks!
Hi - I'm a web designer (emphasis on "designer") getting ready to do my first Drupal
Drupal
An open-source content management system that is used on this site and is taking over the world. siteA logically grouped set of content - also web site.... and it is huge. I know how to spell droopal (yes, that was a lame attempt at a joke) and that is about it. I am lucky enough to be working with a developer but your cookbook is doing a nice job of giving me the background knowledge I need to talk the language and providing a starting point. Thanks!- Steve
You're welcome
Glad it helps
drupal info for noob's
thought i could add to this with these:
this is really good to understand the file convention: http://tips.webdesign10.com/how-to-make-a-drupal-theme
here is a list of themable variables for the little more advanced:
http://drupal.org/node/11816
there's one more that i got bookmarked on my home pc that i can post later which was the most helpful...