By Fma46 on
Hello, I'm kinda of a newbie to Drupal, and I noticed the making a theme is really hard. I was wondering if someone could just make me a simple CSS layout.
http://nekonation.com/css/default.css
I made that CSS layout, and that is preferably what I would like to use.
To view my website on how I want it to look visit...
http://nekonation.com
Yes, i already have the site made, but it's not running drupal yet...
Comments
Easier than you may think
Theming for Drupal is not actually as hard as you may think. Looking at a lot of the Drupal themes that you can download, it does look harder than it is, since those templates usually include tons of PHP "if this setting is true, then show this way, or else show that" sort of code, so that all kinds of situations and modules and configurations will work. However when you're making your own personal theme that's just for your own use, you don't need much or even any of that. All you need is the bits of PHP pasted into your own HTML template that load Drupal's dynamic content in those spots.
There are quite a few more that you could use if you want (here's a nice lesson with more details), but to drill down to just the most basic elements you need:
The head section of your site:
Include the blocks that are set to show in the sidebar region/regions (see admin/build/block)... by default this includes things such as the login form and the admin menu. This is slightly different between Drupal 5 and 6...
Drupal 5:
Drupal 6:
Drupal's primary & secondary menu system (e.g. depending on the type of menu you're making, paste this into your template's sidebar area, or your top tab/button navigation... this outputs just a basic HTML unordered list, which you can style however you want)... if you are sure you're using the primary links and secondary links menus, then you can also remove the "if" and "endif" parts to make it look simpler):
Print out the main content + any appropriate help/messages, breadcrumb links, the title of each page, and sub-navigation tabs such as the View and Edit tabs... this goes in the center of your theme, where content usually goes (the "if" parts are since not all of these display on every page, some such as $messages only when appropriate):
Must go at the end of your page.tpl.php file:
Lastly, in Drupal 6, the one final element is to create a YourThemeName.info file:
I hope this is helpful for you :) Paste in the above bits of code into ANY site layout, and you have a Drupal theme.
-- David
absolutecross.com
David, this is great stuff
David, this is great stuff for newbies, if not already perhaps you could expand this into a helpful book page in the docs?
Pimp your Drupal 8 Toolbar - make it badass.
Adaptivetheme - theming system for people who don't code.
Absolutely
Absolutely :) I'll copy this over to my site to perfect it and post it to the handbook within a few days. I "ate my dog food" on this the other day, and converted the theme for my site absolutecross.com into a Drupal theme literally within a few minutes. It wouldn't be "contrib ready" in that time, but for a personal theme not meant for contrib it's a piece-o-cake :) I'm sure there will be a few spots theming more inticate bits of it, but this gets ya most of the way there.
-- David
absolutecross.com
[new guide/lesson in progress: Creating a CCK and Views powered Drupal site - feedback welcome]
About half done
Got a good start on it... about half done with my "rewrite": http://www.davidnewkerk.com/book/33
-- David
absolutecross.com
[new guide/lesson in progress: Creating a CCK and Views powered Drupal site - feedback welcome]