[themes] Help with my first theme ... please

ReynierPM reynierpm at gmail.com
Mon Mar 26 01:30:02 UTC 2012


Hi every:
I'm trying to create my first theme and I want to use Twitter Bootstrap 
as CSS framework. I'm using Zen as base theme so my info file 
(comvivem.info) looks like this one:

name        = Comvivem
description = Comvivem theme for COMVIVEM Community based on Zen and 
Twitter Bootstrap
screenshot = screenshot.png
core       = 6.x
base theme = zen

stylesheets[all][] = css/bootstrap.min.css

regions[sidebar_left] = Sidebar Left
regions[sidebar_right] = Sidebar Right
regions[header] = Header
regions[content] = Content
regions[footer] = Footer
regions[footer_col_1] = Footer Column 1
regions[footer_col_2] = Footer Column 2
regions[footer_col_3] = Footer Column 3
regions[footer_col_4] = Footer Column 4

features[] = logo
features[] = name
features[] = slogan
features[] = mission
features[] = node_user_picture
features[] = comment_user_picture
features[] = search
features[] = favicon
features[] = primary_links
features[] = secondary_links

settings[zen_block_editing]        = 1
settings[zen_breadcrumb]           = yes
settings[zen_breadcrumb_separator] = ' › '
settings[zen_breadcrumb_home]      = 1
settings[zen_breadcrumb_trailing]  = 1
settings[zen_breadcrumb_title]     = 0
settings[zen_rebuild_registry]     = 1
settings[zen_wireframes]           = 0

Then after I create a page and call it page.tpl.php and wrote this inside:

<!DOCTYPE html>
<html lang="en">
     <head>
         <?print $head; ?>
         <title><?php print $head_title; ?></title>
         <meta name="viewport" content="width=device-width, 
initial-scale=1.0">
         <?php print $styles; ?>
         <?php print $scripts; ?>

         <!-- Le HTML5 shim, for IE6-8 support of HTML5 elements -->
         <!--[if lt IE 9]>
           <script 
src="http://html5shim.googlecode.com/svn/trunk/html5.js"></script>
         <![endif]-->
     </head>

     <body>

         <div id="header" class="container-fluid">
             <?php if ($header): ?>
                 <?php print $header; ?>
             <?php endif; ?>
         </div> <!--./header-->

         <div id="page_content" class="container-fluid">
             <div class="row-fluid">
                 <?php if ($sidebar_left && !$sidebar_right) { ?>
                     <div id="sidebar-left" class="span3">
                         <?php print $sidebar_left; ?>
                     </div><!--/sidebar left-->

                     <div id="content-center" class="span9">
                         <?php if (!drupal_is_front_page()): ?>
                             <?php echo $content; ?>
                         <?php endif; ?>
                     </div><!--/content-center-->

                 <?php } elseif ($sidebar_left && $sidebar_right) { ?>
                     <div id="sidebar-left" class="span3">
                         <?php print $sidebar_left; ?>
                     </div><!--/sidebar left-->

                     <div id="content-center" class="span6">
                         <?php if (!drupal_is_front_page()): ?>
                             <?php echo $content; ?>
                         <?php endif; ?>
                     </div><!--/content-center-->

                     <div id="sidebar-right" class="span3">
                         <?php print $sidebar_right; ?>
                     </div><!--/sidebar right-->

                 <?php } elseif (!$sidebar_left && $sidebar_right) { ?>

                     <div id="content-center" class="span6">
                         <?php if (!drupal_is_front_page()): ?>
                             <?php echo $content; ?>
                         <?php endif; ?>
                     </div><!--/content-center-->

                     <div id="sidebar-right" class="span3">
                         <?php print $sidebar_right; ?>
                     </div><!--/sidebar right-->

                 <?php } ?>
             </div><!--/row-->
             <hr>
             <footer>
                 <div class="row-fluid">
                     <?php if($footer_col_1): ?>
                     <div id="footer_col_1" class="span4">
                         <?php print $footer_col_1; ?>
                     </div><!--/footer_col_1-->
                     <?php endif; ?>
                     <?php if($footer_col_2): ?>
                     <div id="footer_col_2" class="span4">
                         <?php print $footer_col_2; ?>
                     </div><!--/footer_col_1-->
                     <?php endif; ?>
                     <?php if($footer_col_3): ?>
                     <div id="footer_col_3" class="span4">
                         <?php print $footer_col_3; ?>
                     </div><!--/footer_col_1-->
                     <?php endif; ?>
                     <?php if($footer_col_4): ?>
                     <div id="footer_col_4" class="span4">
                         <?php print $footer_col_4; ?>
                     </div><!--/footer_col_1-->
                     <?php endif; ?>
                 </div>
             </footer> <!--./footer-->

         </div><!--/.page_content-->

         <?php print $closure; ?>
     </body>
</html>

But it's not working because when I enable the theme I can't see any of 
the regions and either bootstrap.min.css is loaded. Any can help me 
here? I'm stucked and I read the docs without success :(

Cheers and thanks in advance
-- 
Ing. Reynier Perez Mira
eMail: reynierpm at gmail.com, reynierpm at treswd.com
Skype: reynierpm
Mobile: +58 424.180.5609


More information about the themes mailing list