Your SlideShare is downloading. ×
Converting Static Html To Drupal Theme
Upcoming SlideShare
Loading in...5
×

Thanks for flagging this SlideShare!

Oops! An error has occurred.

×
Saving this for later? Get the SlideShare app to save on your phone or tablet. Read anywhere, anytime – even offline.
Text the download link to your phone
Standard text messaging rates apply

Converting Static Html To Drupal Theme

37,274

Published on

How to convert a static html design to a dynamic Drupal theme

How to convert a static html design to a dynamic Drupal theme

Published in: Technology
10 Comments
22 Likes
Statistics
Notes
No Downloads
Views
Total Views
37,274
On Slideshare
0
From Embeds
0
Number of Embeds
1
Actions
Shares
0
Downloads
1,102
Comments
10
Likes
22
Embeds 0
No embeds

Report content
Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
No notes for slide

Transcript

  • 1. Static HTML to Drupal Theme By Ivan Zugec
  • 2. Static HTML to Drupal Theme.
    • Setting up a theme.
    • Overriding tpl files.
    • Using the devel module.
    • Q and A
  • 3. Static HTML page
  • 4. Required theme files and folders
    • Images folder
    • Page.tpl.php
    • .info file
    • Style.css
  • 5. Where do we save themes? sites/all/themes
  • 6. .info file for your theme ; $Id$ name = rgdesign core = 6.x engine = phptemplate regions[left] = Left sidebar regions[right] = Right sidebar regions[content] = Content regions[footer] = Footer
  • 7. Regions
  • 8. page.tpl.php file
  • 9. Page.tpl.php Replace this:
  • 10. Page.tpl.php With this: <title><?php print $head_title ?></title> <?php print $head ?> <?php print $styles ?> <?php print $scripts ?>
  • 11. Page.tpl.php Replace this:
  • 12. Page.tpl.php With this: if ($logo || $site_name) { if ($logo) { print '<a href=&quot;'. check_url($front_page) .'&quot; title=&quot;'. $site_title .'&quot;>'; print '<img src=&quot;'. check_url($logo) .'&quot; alt=&quot;'. $site_title .'&quot; id=&quot;logo&quot; /></a>'; } print '<h1>'. $site_name .'</h1>'; }
  • 13. Page.tpl.php if ($logo || $site_name) { if ($logo) { print '<a href=&quot;'. check_url($front_page) .'&quot; title=&quot;'. $site_title .'&quot;>'; print '<img src=&quot;'. check_url($logo) .'&quot; alt=&quot;'. $site_title .'&quot; id=&quot;logo&quot; /></a>'; } print '<h1>'. $site_name .'</h1>'; } <?php if (isset($primary_links)) : ?> <?php print theme('links', $primary_links, array('class' => 'links primary-links')) ?> <?php endif; ?>
  • 14. Next regions
  • 15. Left Side Bars With this: Replace this: <?php if ($left): ?> <?php print $left ?> <?php endif; ?>
  • 16. Right Side Bars With this: Replace this: <?php if ($search_box): ?> <div class=&quot;block_menu&quot;> <h3>Search</h3><?php print $search_box ?> </div> <?php endif; ?> <?php if ($right): ?> <?php print $right ?> <?php endif; ?>
  • 17. Footer With this: Replace this: <div class=&quot;center&quot; id=&quot;f&quot;> <?php print $footer ?> </div> <?php print $closure ?> </body>
  • 18. Content region
  • 19. Important Variables <?php print $breadcrumb ?> <?php print $messages ?> <?php print $tabs ?>
  • 20. Important Variables <?php print $title ?> <?php print $help ?> <?php print $content ?> <?php print $feed_icons ?>

×