hi there i have an simple html and css page i want to convert in to an drupal theme but no matter how many vidoes i watch or guids i fellow i cant seen to work it out

i not sure what parts to put the php arrys in here just the simple html code i have for the site

maybe some would not mind helping me on this fourm post or maybe on msn or an different im software

if i can just get an foot in the door on how to conver normal html and css pages in to drupal i be wel away and will even make an few to give back to the community

if you would like to help on im ect drop me an pm

thank you Martin or if you need the css as well i will post here as well

<head>
<link href="sheet.css" rel="stylesheet" type="text/css" />
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<title>Untitled Document</title>
</head>
<body>
<div id="headbox"><span class="heading_text">reshers</span></div>
<div id="main">
<div id="header"><img src="images/logo.png" width="130" height="130" /></div>
<div id="menu"> <a href="index.html">home</a> about archive contact blog RSS merchandise <a href="/forum/">forum</a></div>
<div id="right_col"><img src="images/wideskyscraper_img.jpg" width="160" height="600" /></div>
<div id="mainbox">
  <p><img src="images/1465.png" width="600" height="1417" />
 <div id="page_link">
 <li>First</li>
 <li>Previous</li>  
 <li>Next</li>
<li> Last</li>
<li>Random</li>
 </div>
 <div id="comment_text">
   <p>comment</p>
 </div>
 <center><img src="images/300x250_img.jpg" width="300" height="250" /></center></div>
</div>
</body>
</html>

Comments

callison’s picture

Get one of the core theme's page.tpl.php file and compare it to the HTML file you want converted. In your new theme, add in the php code from the .tpl.php file and you're well on your way.

felxo’s picture

what do you mean by core theme ?

callison’s picture

Core themes are themes that are shipped with Drupal. They will be in the drupal-root/themes folder (contributed themes should be in the drupal-root/sites/all/themes folder). Bluemarine is a pretty standard and simple theme to use as a starting point. Another option for you to consider is using a base theme that is designed specifically as a starting point for themers. You can do a search or look in the contributed themes to find these.

Jeff Burnz’s picture

I agree about starting with a Starter theme, and at least take the time to dissect a number of contrib themes and the Drupal core template files.

Trying to build a complete Drupal theme from scratch is like trying to run before you can walk, some find it easy but really its a mountain to climb, start with a few low hills instead ;)

Anonymous’s picture

Please read carefully through the theming guide: http://drupal.org/theme-guide. If you have Drupal installed, then you are using one of the default themes that come with Drupal. You can tell which theme you are using at this path:

http://YOURWEBSITE/admin/build/themes

and note which theme is marked as "default". This will tell you what theme you are using. Once you know the name of your theme, you can look at the files that are being used to format the pages in your theme. If your theme is Garland, find the Garland theme directory (for example /themes/garland directory) and take a close look at page.tpl.php. That is the template file that is being used to output every page on your site (although other files, such as node.tpl.php, are also used for portions of pages). You can start learning about theming by making small changes to the page.tpl.php file of your theme and look at the effect that the changes have on your page.

That said, I think there are more direct ways to accomplish what you want. Oftentimes in Drupal you set content in the administrative backend perhaps using contributed modules instead of specifying that content directly in your .tpl file. For example, in your html above you include an img ad in your right column. A better approach would be to use the admin to create a block and assign that HTML to the block and assign the block to the standard righthand column using admin/build/blocks. Again, a careful reading of the theming guide will help clear some of these things up and provide some directions on how to achieve what you want to achieve.

ianemv’s picture

Hi there felxo, with regards to converting your HTML code and CSS to Drupal theme, you need to know first the skeletal presentation of Drupal themes such as the page.tpl.php, box.tpl.php, block.tpl.php and etc. Those are the things you'll be using to accomplished your aim.

Btw, I'll be posting later today my first converted WP theme to Drupal available for download but I will still fix some bugs I noticed yesterday.

ianemv’s picture

Hi felxo, feel free to download my first or "amateur" WP theme to drupal conversion at http://ianemv.blogspot.com/2009/11/as-promised-wp-theme-to-drupal-theme.....

Jeff Burnz’s picture

This theme is badly broken - node add/edit pages are unusable, many admin pages are simply too broken to be usable. Then there are the many hard coded banners and links...

Download and use at your own risk.

ianemv’s picture

I would like to emphasize that I actually mentioned the problem at the demo page. I actually want the banner,hard coded links and social bookmarking to be incorporated to theme configuration but I don't have any idea yet.

Maybe you can help me improve this theme :)

Jeff Burnz’s picture

Theres two ways to go about this sort of thing:

1. build a module that generates these features and ship it with the theme.
2. build an install profile and use CCK, Views etc and ship the install profile with the theme.

My opinion is you have "WP mentality" going on here - Drupal is way flexible so hard coding anything just reduces that flexibility. Most Drupalers just want plenty of regions to place blocks in, and for them to look nice when they do so.

I think you'll get the Drupal-backlash if you try to load up your themes with back-links, its a community pet peeve.

ianemv’s picture

Great! I should learn creating modules too so that I can achieve what I want to do with the theme. I will also avoid putting back-links.

Again, your review is really appreciated.