1

I know that the Zen starting theme is very popular but I find it harder to edit a theme made by someone else (even if it's as simple as Zen) that to create my own in static html. Is it ever a good idea to start with a static html design and then port it over to drupal? Or am I just doing twice the work for no reason?

I'm interested in hearing what other, more experienced, drupal devs do when designing a new theme.

Radu
  • 8,561
  • 8
  • 55
  • 91

1 Answers1

1

Personally, I would never hand-code all html and css and then port it to a Drupal theme. I don't agree with Kevin that "all themes start as html". Allow me to quote what I wrote before on the drupal.org forum:

Imagine writing your own html, complete with id's and classes. You also write css and adapt the css selectors to the html structure, id's and classnames you created yourself. Next, when you have to turn that into a Drupal theme, you will find that Drupal adds it's own html structure, id's and classnames. This means that you will have to start making changes: either change the Drupal output to match the mockup you made earlier, or change the css selectors to match Drupal's html output. Either way, you're doing double work. It's just not efficient.

And in another topic I wrote:

One thing you have to understand about Drupal theming, is that not all xhtml/css/js output is generated by the theme, because modules provide their own default output. The theme is able to override that output, but in many cases there is no reason to do that because the default output is usually valid, functional and flexible. If you want the final xhtml output to be 100% identical to the xhtml you created, you will have to override every single theme function and template... now that would be a waste of time.

If you're used to writing static html, Drupal theming may require a change in mentality. If you want to be efficient in Drupal theming, you will have to learn to work with the default html output. Whenever possible, use only css. Starterthemes like Zen, Genesis and Fusion provide an excellent base to build your own custom theme.

marcvangend
  • 5,592
  • 4
  • 22
  • 32
  • In your experience, is it possible to get the precise results I want just with css edits? – Radu Nov 06 '10 at 22:58
  • It really depends on the graphic design, but usually, CSS only will get you to 80%. In most cases, you will have to override a couple of theme functions and/or templates to alter the html output, or add a preprocess function to make more variables available to the template. Sometimes I install additional modules like Display Suite or Panels to control (part of) the page lay-out. – marcvangend Nov 07 '10 at 09:59