Hi All,

I would like to start with Drupal but my site will be not the same as the provided templates here. I'am good with CSS and HTML and therefore wanted to design a site which is CSS valid and SEF.

My Idea was to design the site as a standard site and then transform it into a Drupal design. Is this a good solution and a quick one? Do I have to look after some important issues? And if it is not the best option what is?

Comments

Annika’s picture

You can certainly start off with making a framework as static template pages, but take into consideration that the major part of the source code is generated by Drupal and that includes CSS (which you of course can override).

Drupal also have a somewhat steep learning curve if you haven't worked with this type of CMS before. It's a fantastic beast but takes some time to get to know.

I would suggest that you read though the handbook and start off by looking through how one of the core themes is constructed to give you an idea of how the code works together with html and CSS.

If you want something quick and dirty, I'm afraid you have to live with one of the contributed themes. Of course, you can start off by putting that up while you work on your own theme!

Good luck!

Ayza

nofue’s picture

Servus.

Being a newbie to Drupal myself I spent most of last week (my family can tell) getting into Drupal. Well, as most people will tell you, everything can be done -- but not necessarily in a way you'd imagine coming from HTML+CSS (I know what I'm talking about, having the same background). After working quite some time to convert my stuff to Drupal themes I decided against this approach -- design is a nice thing, but it is easily added to Drupal later. I set up the following path (your milage may vary):

1.) build a site which has the intended functionality
1.a.) use as many core modules as possible to get there
1.b.) add as few as possible modules to enhance for what you intend.
2.) get into theming -- probably throwing some CSS should help to get closer to what you have in mind. You're free to add serious theming later.

1.b. became an issue once I noticed that modules aren't very friendly to each other at times. So far I'm testing tinyMCE, image, CCK, views and panels to get the added functionality I'm looking for. There are still huge gaps in my understanding, but they seem to fill quicker when I'm dealing with "real" content.

The menu and taxonomy system needs special attention -- I think it's easier to add design to a working structure than to have to tweak structure to fit the design.

Depending on the time you can set aside for this project you may start building "your site" on a core Drupal installation. Once you get stuck with functionality, check the modules page to see what may fit your needs. Then, before downloading the module, search Drupal for the module's name -- if there are problems, people have probably spotted them already. If there aren't any posts it's likely the module will work fine. But this doesn't mean it will do what you expect :)

However, spend some time on testing that module and if it does what you want, proceed with your site building process. Never care about how it looks -- the guys behind Drupal are programmers and they don't really care about design. As little as I care about programming :)

Once your site _does_ what you think it should do, start exploring how to make it look and feel the way you planned it. I suppose I will have to make a lot of trade-offs either way with the first sites I'm going to build -- but I found a lot of nice looking Drupal sites which convinced me to abandon my former CMS which was much nicer to build good looking sites from working CMS+HTML, but was painfully unstable, immature and error prone.

Uh, one more recommendation: I've set up three different machines with Drupal -- locally I got two -- one for testing new module's co-existence with already used modules, one for building stuff with modules which passed test #1. On my webserver I set up a third testing installation where I implement a real site of little importance with modules which passed test #2. This way I hope to have a first working site with Drupal looks up soon. Once it works, I'll throw in some of what I expect to become important in future: server tuning & maintenance, upgrades, localization, backup, restore, whatever I can think of. Just to be familiar with emergency procedures in case I'll need them with any published website...

Once I'm done with all of this, I'll start thinking design again. This will require some PHP learning as well to get the most out of the clever hook-system -- and my tests so far showed that it's pretty easy to move content around the screen if you're good with CSS.

It may sound like a nightmare to you, but to me it's a big relief after months of calls from clients because the CMS I used so far limited functionality badly. These folks may have complained about the looks for a while, but never would have called me on Sunday mornings because of that. But they did call me when they couldn't get what they wanted from the system...

Hope this wasn't too long, but also hope it was helpful for people considering this nice and well thought-out software for a solution. There's some learning involved with every new system, and Drupal is no exception. But so far I feel much more comfortable with it than with any system I used since 1996...

Hope you'll feel fine with Drupal as well,

Norbert

Norbert

-- form follows function

boris mann’s picture

Great write up, Norbert. This is almost a mini-tutorial on consulting/information architecture with Drupal. Maybe with that end goal in mind, this might make a good case study / best practices / how to, good for adding to the handbook.

sepeck’s picture

Please do add it to the handbook.
Add a child page here: http://drupal.org/handbook/customization
We need approach and consideration articles in designing and planning a site. Your write up is an excellent basis for such a section.

New users to CMS's or others wanting to try their hand miss some of the fundamentals that more complex things such as CMS' really need to have a successful implementation.

Also, I have a tutorial on moving a design into a Drupal theme. At least give an idea on how to place the variables.

-Steven Peck
---------
Test site, always start with a test site.
Drupal Best Practices Guide -|- Black Mountain

-Steven Peck
---------
Test site, always start with a test site.
Drupal Best Practices Guide

cmsproducer’s picture

If you are just starting off, there is no quick and simple secret, but if you examine the page.tpl.php of an existing template, you may understand that you can create a pure XHTML/CSS template and then replace some elements with PHP snippets that can pull-in dynamic cotnent from Drupal. Natually, I cannot detail the entire process in this single post; you can do some reading on the various techniques and approaches to creating drupal themes

-----
iDonny Web Productions: Web Strategy, CMS Design, Branding, & Production

Tmanagement’s picture

Thanks so far for all the information.

Nevertheless I am still confused about something.
1. Is Drupal using own CSS classes or does it uses the classes you have defined in CSS while styling the static website?
If it does uses its own classes where can those be found?

2. It seems not possible to just use the CSS sheet I created for the static website and then put in php code for the dynamic Drupal content. Why is that? It would be much simpeler if it would work that way and in addition it would live up more to the idea that CSS is leading for the looks and that in this case Drupal will deliver the content where you want it to.

3. Everybody is talking about something like phptemplate. Why is such an addon necessary? What does it do?

4. In the comments it is sugested to first build a working Drupal site not paying any attention to design and then afterwards add design once the site is working the way you want. This should be done because the otherway around would be to hard. In theory it shouldnt matter when you put the design in to play because thats the whole idea of CSS (seperate content from design). Does this mean that Drupal does not support CSS that well or are there other good reasons for this roadmap of design at the end.

Overall I just dont get the difficulty all CMS systems have with customizing design. I really dont see the benefits/necessarity of not just use customized XHTML/CSS in which PHP code can be placed where it has to be according to that XHTML/CSS combination.

Annika’s picture

1. Yes, Drupal has it's own style sheet found in Misc/Drupal.css. You can of course override it with your own additions to the included classes and IDs.

2. Because - I think - Drupal packs so much functionality that it simply wouldn't work without any basic styling. But, as written above, you can override it in your own stylesheet. Just view the source and you'll see what Drupal is generating.

3. It's a theming engine that is used to render themes better. It is included in the Drupal distro, but you can use themes without any theming engine or another theming engine like Xtemplate. Look in the handbook.

4. Don't really understand what you mean. You have to understand that Drupal is a highly flexible and complex CMS with a lot of built in functionality. It fully supports CSS to a degree that the core itself needs CSS to display what it does properly.

(5.) If this is your goal, I suggest you look at ExpressionEngine (http://www.pmachine.com) which works exactly like you want. It does not do all the things Drupal does, but is easier to handle for designers and for straight up blogs and corporate sites. You just drop in the php where you want it. It does cost a bit though.

/ Ayza

Tmanagement’s picture

@Ayza

(4)Norbert (nofue) was talking about first to put up a working website with Drupal that met your requirements and after that you should focus on design. With this approach he decided not to design a static page with XHTML/CSS and then turn it into Drupal.

I will pay full attention to all the information available but the difficulty is that there is not a clear explanation in my opinion how the basic works. For example, there are people saying that you can indeed design XHTM/CSS and then easily convert it into Drupal whereas others say that you cannot because it will give you troubles and then they say, read the handbook, look at phptemplate, dont pay to much attention to a great looking site because Drupal is having a steep learning curve etc.

For example http://tedserbinski.com/node/36

As your link is proofing you can indeed desing your CMS in such a way that you can insert PHP code on the places where your dynamic content needs to be using your static XHTM/CSS website as a basis.

As far as I understood your explanation, I dont have to use a template engine? If not, why should I then?

You also told that you can overide the CSS classes used in Drupal. Do you mean that when I am finished with the static XHTML/CSS website (used ID's and classes) that Drupal wil not have any problems with that?

Finaly I would like to say that I really appreciate all the help.

nofue’s picture

Servus.

Seems this is finally a thread I like :)

Drupal is way too unspecific to have the "one and only roadmap to Heaven". There are many ways to Rome, hence you will read different things from different people.

As a designer, I would do my draft in Illustrator (or Photoshop, whatever you prefer, even Indesign is fine with complex projects) and don't deal with HTML anyway.

The reason behind this:
I don't want code Drupal to my likings, I rather shape the design to match my intentions. Once the content gets delivered, it's quite easy to write that page.tpl.php and CSS to put content in the right containers. There's simply no need to deal with HTML code at a very basic level.

There's a project of mine which I want to build with Drupal. I have still no idea how I get this thing done, but I know what kind of content I have to present, and I know what I want the final page look like.

First, I'll provide my client with the ability to put his content online. This way I learn what he has in mind while I can tweak the various *.tpl.php files and my CSS to fit the proposed look and feel. All it needs is setting up a working Drupal installation, creating a new user-role "editor" to prevent the guy from touching "hot surfaces" and allowing him to administer stuff he should be in charge of. If necessary I can add some more roles so different users can care for different things.

The beauty of this approach is that we aren't dependend on each other. He's doing content, I care for containers. Once he's done with putting his content online, I can easily theme the entire site by simply switching the theme folder without any worries about breaking any code or whatever.

Dealing with phptemplate is still some time in the future for me -- I want/need sites out soon, and I don't have the time to learn every aspect of Drupal before starting with the first site. If there's a need to tweak the way Drupal delivers, phptemplate comes into play -- but as long as I can do without it, I'll leave it alone.

And as I said, you can as well strip you HTML and add PHP snippets from any *.tpl.php you think appropriate. It's the same procedure, whether you transfer your HTML to the *.tpl.php files or the other way around. You end up with a set of *.tpl.php files in your themes folder and control the looks with the screen.css in the same folder.

Hope it helps,

Norbert

-- form follows function

Norbert

-- form follows function

nofue’s picture

Servus.

I can see your confusion, and it's not only you who is confused at first. I hope I can shine some light on the topics:

First, no piece of CSS can style any HTML without knowing the proper classes and id's. You can of course style standard HTML tags, and it's the same with Drupal. As Drupal is generating the code, you have to look up the classes it generates by default to style the classes you're interested in. There's "styles.css" which gets you directly to the point. Make a copy (better safe than sorry thing :) and modify styles.css to your liking.

As I have no idea how familiar you are with CSS, I can only point you to some of the very basic stuff you may want to look up: if there is an HTML and a CSS already, there are perfect examples on this site how to strip out all the content from HTML to get a skeleton to start from. The bare bones are named classes which reflect the structure of your page. Now fill in the proper PHP statements and your layout comes alive.

Let's assume you have

<div id="header">
      <img class="myLogoImageClass" src="logo.png" alt="My Logo" />
   </div>

You strip this down to

<div id="header">
   </div>

Next you look up the page.tpl.php of let's say Bluemarine (in the themes folder). There you'll find what Drupal variables are used to send the different parts of your page to the final page. You need some very basic PHP code here to get some "flesh" on the bare bones. Let's assume you want your logo be shown in the header section of your page, you may come up with something like this:

<div id="header">
     <?php if ($logo): ?>
                <img class="myLogoImageClass" src="/<?php print ($logo) ?>" 
                 alt="my logo" /></a>
      <?php endif; ?>
      </div>

Pretty much the same as before, if you aren't afraid about the php snippets in between your code. But they're needed to get the proper content from the datebase to your page. Think of it being the glue between content and container.

It's that simple, really. All you have to do is match the names in use.

From your writing, I'd say you should re-think the whole webpage thing first:
CSS is a nice thing, for sure. But in fact it's only adding eye-candy to content. As long as you don't have any message you want to present, there's no need to discuss the way how the stuff should be presented to the audience. Content rulez, to cite a popular slogan, and search engines are interested in content only...

So if you want to deploy any software for managing content without having to hand-tune every single page you create, you have to classify your content first, put it into the proper nodes as Drupal calls these atomic chunks of content, and then you decide where to present what chunk where and how -- that's where the CSS comes in. Starting with the CSS is like tayloring a suit and later asking for the right person to wear it...

The Drupal folks were really smart inventing that structure: Their PHP code just happens, and put into the proper sections of your page.tpl.php the sections will be embedded to your site structure and your CSS. The programmers don't have to care about the looks of your page, they can stick with programming efficient code. Our part "on the other side of the screen" is just to take what they deliver, have a look on the tag they put on that piece of information (they call it a variable, like $logo) and embed it in our layout. That's the smartest approach to the problem I know. All it takes to become familiar is to get into the themes folder, copy a theme of your liking, renaming that new folder 'myTheme' and engaging that theme in 'administer::themes'. From then on you can tweak the page.tpl.php and screen.css to your likings... Once you got that, you will have less trouble to get into more advanced concepts.

Your final conclusion about when to start with what is somewhat mood. Clearly, you have content first, then navigation and usability, and finally you make the stuff look good. If there is no block of marble, you can't craft a sculpture. You can do sketches and drawings, but you can't sculpt anything without content.

I do my design sketches in Illustrator without having to touch content. Once I'm satisfied with the looks in Illustrator, I can define the regions of my page and start building a working draft. That working draft defines a lot of CSS classes not yet built, and later I'll add a meaning for these names doing the CSS.

Have a look at www.csszengarden.com -- the whole project is built on GIVEN html and designers are allowed to submit only the CSS. They don't tweak the content to the presentation, but adjust the presentation to the given content. That's the way design works, making the best (or most appropriate) from any content.

Drupal is pretty much in synch of this way of doing sites. Drupal's support for CSS is out of question -- Drupal is just delivering content to your backdoor and you have to make it look good in the shopping window. That's the whole point of doing things with CSS, and in this sense Drupal does a perfect job. It simply delivers.

Of course you won't use Drupal if you want a perfectly handcrafted page -- Drupal or CMSes in general deal with classes of content, presented the same on various pages. That's great for maintaining content, and having content added by less educated folks. Even a secretary can add content to a properly built CMS. As a web designer from the early days of the web I can remember my clients calling me to ask for a new page on their site. With Drupal, these days are gone and I can concentrate on what I really want to do: care about presentation. As a designer, I take the responsibility to make my client's content look as good as possible, but I don't want to deal with basic stuff like copying html code and entering new content into the various p tagged sections of that page any more. On the other hand, I have to sacrifice some of the freedom I had before -- if content doesn't fit my design, I have to give design a second thought. But not having to worry about the underlying code is worth it.

Hope you'll discover yourself,

Norbert

---
form follows function

Norbert

-- form follows function

Tmanagement’s picture

Thanks Norbert,

CSS is not a problem for me and those php code parts are simple. What you explained looks to me at what I want. Just code XHTML(for div's id's etc) and then style with CSS. The only thing you have to do is looking at the various parts of php that output content which you have to place on the right spot in your XHTML document. Right?

Because CSS is not a big problem to me and because I understand that you need php code to put dynamic content where you want it to a tailord Drupal site with a specialized design should not be that hard (of course it will take time) correct?

If the above is true, can we then conclude that most people are having troubles with styling Drupal as they please because they hardly know any XHTML/CSS/PHP and therefore cannot connect everything to a complete website?

nofue’s picture

Servus.

I guess the answers to your latest post are: right, correct, and, right :)

The biggest problem with Drupal is the missing design-force. It's a bunch of programmers who do pretty perfect code, but they don't talk "our" language. If you ask them about anything but code, they will come up with a hundred ways to skin the cat and leave you in confused dispair. The most successful way to get your projects going is doing them. Once you get stuck, raise a question.

If you're using XHTML/CSS at high level for some time, you shouldn't have any problem to make Drupal look right, and if you aren't shy about the PHP stuff in your beautiful XHTML code, the better.

All the best,

Norbert

-- form follows function

Norbert

-- form follows function

Tmanagement’s picture

Great!

If everything works out well and when I have understanding how it works I will try to write a handbook for people like us used to design using XHTML/CSS in order to welcome those people as well.

fallacious’s picture

[quote]If the above is true, can we then conclude that most people are having troubles with styling Drupal as they please because they hardly know any XHTML/CSS/PHP and therefore cannot connect everything to a complete website?[/quote]

Drupal has a reputation of being complex in general and with regards to themeing in particular. It's enough to literally scare potential users/themers away.

After using standard themes for a few years, I finally decided to sit down and figure out what it takes to port a theme from OWD. I used a simple methodology - start with what OWD ships, make Drupal render that page properly, and then merge/replace the theme engine snippets to display an actual Drupal site. To make a long story short - there are two answers. First, if you have a specific site and its layout in mind, there's a reasonable expectation to complete such a port in very short order. Second, getting such a port ready as a generic, distributable theme is much more work, because in the general case there many more scenarios to consider. The latter may explain why there are relatively few contributed, generic themes compared to other products.

Tmanagement’s picture

@fallacious

Why is it harder to publish a custom template for generall public then it is to do so for your own use? I do not get the point.

sepeck’s picture

Because with a custom to your specific needs template you can ignore areas you are not using. Your site doesn't have forums? Then you do not need to style for them. You don't have an image gallery? Then you don't need to style for them. Generic themes need to account for far more things that 'might' be used.

-Steven Peck
---------
Test site, always start with a test site.
Drupal Best Practices Guide -|- Black Mountain

-Steven Peck
---------
Test site, always start with a test site.
Drupal Best Practices Guide

Tmanagement’s picture

Ah ok. Then it will not be harder but it will cost you more time ;)

fallacious’s picture

Lots more time.

It's possible that some combination of elements used will create a real headache, but from what little I've seen it's just a matter of enduring tedious work.

I myself have a terrible time with placing avatars. Par for the course when CSS happens to be what you know least.

fallacious’s picture

For any given (custom) site, you can limit your efforts to the layout and elements in use. In the generic case, your problem space is much larger. I'll go out on a limb and say that if you know what you're doing, a generic theme is about an order of magnitude more work than a custom theme.

I'm learning all of this the hard way myself. I have a couple of free templates lined up to port into generic themes and after getting my feet wet, I don't understand what the fuss is all about. It seems to me that another 80/20 rule applies - 80% of the work is done in 20% of the total time required.

I don't know that there is a one true way to get the job done. If I were to crank out a site for a client instead of my personal use, I'd pay close attention to the advice given in this thread. The outfitter's analogy is quite apt - in order to tailor a suit that fits, one needs to be skilled in the craft and have basic measurements at the ready. It's probably straightforward to rig up a theme like wireframe as a mock-up for populating a site with content and test-drive the basic layout and functionality, while tackling the custom theme at the same time.