Drupal campmanila 2012 (Responsive Web in Drupal with Omega Theme)
Static HTML to Drupal Theme By Ivan Zugec. Static HTML to Drupal Theme. Setting up a theme....
-
Upload
florence-fields -
Category
Documents
-
view
240 -
download
2
Transcript of Static HTML to Drupal Theme By Ivan Zugec. Static HTML to Drupal Theme. Setting up a theme....
Static HTML to Drupal Theme.
• Setting up a theme.
• Overriding tpl files.
• Using the devel module.
• Q and A
.info file for your theme
; $Id$name = rgdesigncore = 6.xengine = phptemplateregions[left] = Left sidebarregions[right] = Right sidebarregions[content] = Contentregions[footer] = Footer
Page.tpl.phpWith this:
<title><?php print $head_title ?></title>
<?php print $head ?>
<?php print $styles ?>
<?php print $scripts ?>
Page.tpl.phpWith this:
if ($logo || $site_name) { if ($logo) { print '<a href="'. check_url($front_page) .'" title="'. $site_title .'">'; print '<img src="'. check_url($logo) .'" alt="'. $site_title .'" id="logo" /></a>'; }print '<h1>'. $site_name .'</h1>';}
Page.tpl.phpif ($logo || $site_name) { if ($logo) { print '<a href="'. check_url($front_page) .'" title="'. $site_title .'">'; print '<img src="'. check_url($logo) .'" alt="'. $site_title .'" id="logo" /></a>'; }print '<h1>'. $site_name .'</h1>';}
<?php if (isset($primary_links)) : ?> <?php print theme('links', $primary_links, array('class' => 'links primary-links')) ?><?php endif; ?>
Right Side Bars
With this:
Replace this:
<?php if ($search_box): ?> <div class="block_menu"> <h3>Search</h3><?php print $search_box ?> </div><?php endif; ?><?php if ($right): ?> <?php print $right ?><?php endif; ?>
FooterWith this:Replace this:
<div class="center" id="f"> <?php print $footer ?></div><?php print $closure ?></body>