Converting Static Html To Drupal Theme

Loading...

Flash Player 9 (or above) is needed to view presentations.
We have detected that you do not have it on your computer. To install it, go here.

2 comments

Comments 1 - 2 of 2 previous next Post a comment

Post a comment
Embed Video
Edit your comment Cancel

5 Favorites & 1 Event

Converting Static Html To Drupal Theme - Presentation 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 ?>

+ Ryan CrossRyan Cross, 11 months ago

custom

5057 views, 5 favs, 0 embeds more stats

How to convert a static html design to a dynamic Dr more

More info about this document

© All Rights Reserved

Go to text version

  • Total Views 5057
    • 5057 on SlideShare
    • 0 from embeds
  • Comments 2
  • Favorites 5
  • Downloads 141
Most viewed embeds

more

All embeds

less

Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate. If needed, use the feedback form to let us know more details.

Cancel
File a copyright complaint
Having problems? Go to our helpdesk?

Categories

Groups / Events