After building dozens of fairly complex sites by hand (literally Notepad) over the years, I have decided to save what is left of my hair and make the jump to Drupal. So now our testing environment is set up and the default site is "live" locally. Then...the problem. The coder in me downloads the Zen Theme and starts ripping apart the pages and templates, trying to get it to look like our existing sites...but I know that's wrong (right?). I'm adding images, writing custom css, and moving things around the the page.tpl.php file and thinking to myself, "This is wrong. Drupal is more than a user-management and blog posting system. I chose not to use Wordpress for a reason...but why?"

My question: Where do I start to get off on the right foot from a design standpoint? I'm used to building custom sites from a blank slate. Experienced users: Please help. Newbies (like me): Follow me on a series of questions that I can't seem to find answers to.

CSS Image Rollover Menu

I would create an image for the menu (for example), add a bulleted list to the PHP page, and then style the list to overlay my image rollover CSS menu. In Drupal, should I hand-code that in to the page.tpl.php or code it into a header box?

What Is a Menu?

When I think of menu, I think of my navigation bar above. I keep reading about menus, but they seem to have a different meaning in Drupal. Does the term "menu" in Drupal mean the heirarchy of my website's pages? Or is a "menu" an actual menu that I'm creating to post somewhere for navigation?

Custom Breadcrumbs

On my websites, I typically have a "You are here: " navigation. On the home page, it says "You are here: Home" (no links). On the about page, it would say "You are here: Home >> About", and on a blog post it would say "You are here: Home >> Blog >> Category Name >> Blog Title". Drupal comes with built-in breadcrumbs, but if I want to customize it, should I do so in the page.tpl.php file, another file, try to create a module?

Lastly: Modules

I love the idea, but I'm overwhelmed. How do I go about testing a module? That is: I want to add a shopping cart. I find a number of modules available, all for Drupal 6.x. But how do I know which one to choose? (Let's say it's a basic cart.) Which one is "trusted" most by Drupal users? Is there any testing before they are posted here so I can be confident that the shopping cart module isn't sending cart details and information to a sneaky malicious developer?

That's a lot for my first post. I'll keep reading Building Powerful and Robust Websites with Drupal 6, but would appreciate help from the community to springboard me forward and avoid heading in the wrong direction.

Comments

dackdotcom’s picture

What a thoughtful (and in my case) timely post. I am in *exactly* the same boat (except I have my hair). I can't help much directly, but wondering if there is some kind of "best practices" documentation for tweaking themes, creating blocks, and working with modules like CCK and Views. I think the biggest hurdle with Drupal adoption is getting started off on the "right" foot.

New Media Guy’s picture

I just hope my question wasn't too long. I found Wordpress to be very easy to jump in to. With how easy everyone makes it sound, Drupal seems to be the way to go...but where do we start? Here's to hoping that someone can help us! (I can't image we're alone in this!)

styro’s picture

Menus seem to be at the core of most of your questions.

You will want to use the Drupal menus.

In Drupal menus are used for lots of stuff. They can be the user visible navigation bars, they can be the overall site structure. At a fundamental level they are the core of Drupal - all Drupals internal code dispatch and routing is done by the menu - they form the hierarchical mapping of url patterns to page handling callbacks and their arguments and permissions/visibility - but you don't need to think about that unless you are writing modules.

You can create custom menus that are trees of nodes and other items/links. These menus can be rendered for use in the primary and secondary nav bars or as context sensitive blocks in sidebars.

If you do this then the breadcrumbs are automatically generated from the menu structure (mostly). Also the secondary nav menu can (if you like) show the next level below the current item in the primary menu - ie it becomes context related. Also you automatically get CSS classes added for the active menu item, menu items in the active trail get a CSS class (eg parents of the active item - which is effectively the breadcrumb trail) etc etc

By using the built in menus, then you can use all sorts of add modules that enhance the menu - eg CSS pulldowns etc.

Generally you edit the theme templates if you want to rearrage/reorder the content or you want to change some of the HTML tags surrounding the template variables. If you want to edit variables or add new ones, then you do that in preprocess functions in your theme or even in a module. If you really want to tweak the actual operation of something or generation of something in Drupal you'll need a module.

New Media Guy’s picture

Thanks styro. So let's say I am porting a custom site to Drupal. The existing site has structure, content, etc. Thus my Drupal site is already planned out. Should I start on Drupal by creating the page/section hierarchy through menus? Is this Step 1, before I even write a line of CSS or create any content? I know that the order I do things probably doesn't matter much, but I'm trying to start smart. Thanks!

hershel’s picture

Regarding breadcrumbs, it probably depends on your theme. Either template.php in the theme or potentially a custom module would be the way to customize breadcrumbs.

To test a module just setup a test site. :)

There are only two shopping carts for Drupal: http://www.ubercart.org/ and http://www.drupalecommerce.org/ . Both are used by thousands of sites and should be entirely trustworthy. They are open source, reviewed by users and testers, and are developed by teams of people and so anything malicious would mostly likely not be in there.

HTH

New Media Guy’s picture

So I should also learn how to code modules? That is -- most customization (like the breadcrumb example) should happen in modules? I assume that this is so they can easily be turned on and off if needed?

So I guess my fears are a little overblown on module security, huh? :)

hershel’s picture

I don't know if "most" customization happens in modules. Customization of the 'look' happens in the theme. Customization of functionality happens in modules.

See these

http://drupal.org/project/menu_breadcrumb
http://drupal.org/project/custom_breadcrumbs

for examples of modules with custom breadcrumb functionality.

I am not sure what your fears are about security so I can't say if they're overblown. See here http://drupal.org/writing-secure-code for how to write secure code.

mdlueck’s picture

Do yourself a favor, set up a test install of Drupal to mess with. Try modules on that test site PRIOR to installing on production! Some modules might not play nice with other modules, etc...

Some favorite modules that end up on most sites we do:
Meta tags
CAPTCHA
XML sitemap

You at least come from a strong PHP background. PHP was new to me when I began with Drupal. Fortunately I seldom need to mess with PHP code.

Taxonomy is one big key reason to be working with Drupal. I was poised to implement Taxonomy into another CMS system when we learned of Drupal. That other CMS is quite dead... glad we are in Drupal-land.