Hi all,
Can anyone tell me, how can i integrate a html as a drupal theme.
Let say, i have a html template, i want to make it drupal supported template or theme. How can i make it?
It should be drupal 7 supported.

Comments

gooney0’s picture

Big question... Here is the process:

- Install and get Drupal to work properly

- Download and install a theme.

- Copy and rename the theme you just installed in
sites/all/theme/downloaded_theme
to
sites/all/theme/mytheme

- Get rid of the files you don't need. You'll need at least:
page.tpl.php
style.css

- Save your HTML template as page.tpl.php

- Edit your new template and replace all the data with snippets of code from the Drupal template.

- When you think you've got most of it working, enable the new theme and set it as the default.

(you'll have to do some more research of course)

drupsforyou’s picture

Hi gooney0,
thanks for your post, node.tpl.php,template.php etc files are present there.What about those file?
I think your comment over drupal6 template integration, and i want to know about drupal7 template integration .

gooney0’s picture

Yes these instructions are for Drupal 7.

Those other files add templates for specific content. For example if you wanted to apply extra html to each block you'd edit:

block.tpl.php

To adjust the display of a node you'd edit node.tpl.php

If the files don't exist you'll simply get the default output.

In most cases you won't need these files. If you find latter that you do need them just copy them from another template and edit.

You really need to have 3 files:

page.tpl.php = How every page should look
mytemplate.info = Tells drupal about "mytemplate"
style.css = your stylesheet for this template.

ahsihs_yadav’s picture

Please tell me about theming in drupal 7 how can i do full theming for my html template and how can i dode it

Thanks
Ashish Kumar
Software Engineer
Noida
India

roger.ajith’s picture

You have to refer some drupal 7 module.
In core module batrik is very useful to understand all the functionality.
the following folders are very importent
css - put all the css files
js - put all the js file
template - all the tpl.php files
youtheme.info
logo.png
screenshot.jpg - it will apper in frontend
template.php is very useful. you can print all the function variable then you can understand usage of this file.

Christopher James Francis Rodgers’s picture

I do not have a simple answer for you
yet I am curious if you are aware of our community's Theming handbook?

For example the page http://drupal.org/theme-guide/6-7


All the best; intended.
-Chris (great-grandpa.com)
___
"The number one stated objective for Drupal is improving usability." ~Dries Buytaert *

harishpatel86’s picture

For full Html template integration in drupal7 ,follow the step by step process given below.
1.First install drupal 7 on your system
2.Go on root where you have installed drupal7.
3.Open THEMES folder and copy drupal7 default theme name as Bartik.
4.Paste Bartik in the path given below
sites -> all -> themes
5.Rename the pasted theme. for example (bartik>abc) whatever you want to name.
6. Open "abc" folder and rename bartik.info file to abc.info.
7. Open abc.info file there is name = Bartik in the first line of the file replace this name = Bartik to name abc i.e name=abc
8.Go back to abc theme folder and open template.php and rename bratik from all the functions with your theme name.
eg: function bartik_preprocess_html >function abc_preprocess_html.
9.if you want to change logo just copy logo.png (from your html template)which you want to add in your theme and paste in the abc theme.
10.go to /admin/appearance there will be a subtheme name as abc , enable and set this theme as default by clicking the link enable and set default given below sub theme abc
11.Go to templete folder and copy page.tpl.php and paste it here and rename as front--page.tpl.php and save.
12.Clear the website cache.(admin/config/development/performance).