I have been trying to use the Zen theme to start theming a site in 5x. The directions to get started is fairly simple, but I am now at the point where I need to start putting my HTML and everything together and I am not exactly the man when it comes to PHP. So I am just trying to get an understanding of structuring the code inside these files. Just need some sort of general guidelines. Any one with some sort of help will be greatly appreciated.

Thank you

Comments

prestonso’s picture

Look in the documentation for theming and tpl.php files.
___________________

Preston So
Web/Print Designer
Monarch Digital, Colorado Springs
My non-updated non-Drupal site

___________________

Preston So

klewis’s picture

Well... I looked into that first and it lead me to the Zen Theme solution as a starting point. Unfortunately I have not found any documentation specific enough as to where to put code and moving the styles/HTML over.

I will look into the documentation again but first go round wasn't too successful for me...

Thanks

prestonso’s picture

Let me try to really quickly explain what goes on in tpl.php files. Drupal pages are made up of regions. Each region is defined in the page.tpl.php file using PHP rules. Since you're using Drupal 5, the related regions are going to be identified in template.php. What page.tpl.php requires you to do is input each of those defined regions into various places of the HTML. If you have a completed HTML page, save it as page.tpl.php and start replacing certain filler content with rules such as these:

<?php print $sidebar_left ?>
<?php print $content ?>
<?php print $sidebar_right ?>

The $content region displays the content of that page, and so on and so forth. To import the CSS file(s) you used, insert the following code into the head:

<?php print $styles ?>

___________________

Preston So
Web/Print Designer
Monarch Digital, Colorado Springs
My non-updated non-Drupal site

___________________

Preston So