Drupal - Como construir um template

De Pontão Nós Digitais

Arquivo de referência .info

Esse arquivo é composto de chave e valor. Nele há todas as informações base do tema. Veja exemplo:

 name = nome do tema
 description = Descrição do tema
 core = 7.x (versão do drupal para qual o tema serve)
 
 stylesheets[all][] = css/style.css
 stylesheets[all][] = css/outro-css.css
 
 scripts[] = js/scrypt.js
 scripts[] = js/seu-java-script.js
 features[] = logo
 features[] = name
 features[] = comment_user_picture
 features[] = comment_user_verification
 features[] = favicon
 regions[help] = Help
 regions[header] = Header
 regions[page_top] = Page top
 regions[page_bottom] = Page bottom
 regions[highlighted] = Highlighted
 regions[featured] = Featured
 regions[home_services] = Home services
 regions[content] = Content
 regions[sidebar_first] = Sidebar first
 regions[sidebar_second] = Sidebar second
 regions[footer_firstcolumn] = Footer first column
 regions[footer_secondcolumn] = Footer second column
 regions[footer_thirdcolumn] = Footer third column
 regions[footer_fourthcolumn] = Footer fourth column
 regions[footer] = Footer
 ;social links settings
 settings[twitter_url] = #
 ;footer copyright message 
 settings[footer_copyright_message] = © Copyright 2012 by Incredible. All Rights Reserved.
settings[home_tagline] =

Welcome to <a href="#">Sensation</a> Clean & Responsive Drupal Template.

This intro text can be modified and is a good way to say hello to the visitor.

 ;porfolio
 settings[default_portfolio] = 4c
 settings[default_nodes_portfolio] = 12
 ;skin
 settings[theme_color] = default.css
 ;slider settings
 settings[slider_color] = #fafafa
 settings[default_banners][1][image_path]        = images/slider_img_02.png
 settings[default_banners][1][image_title]       = Powerful & Flexible Premium 
Theme You’ve Been Waiting For
settings[default_banners][1][image_description] =

Curabitur bibendum ultricies nisi id vestibulum. Duis ac lacus enim, et rutrum libero. In fringilla aliquet leo faucibus lobortis. Sed leo id quam ornare venenatis non a urna.

<a href="#" class="button medium yellow">Purchase Now</a>
 settings[default_banners][1][image_published]   = TRUE
 settings[default_banners][1][image_weight]      = 0
 settings[default_banners][1][image_color]      = #fafafa
 settings[default_banners][1][image_float]      = right
 settings[default_banners][2][image_path]        = images/slider_img_01.png
 settings[default_banners][2][image_title]       = Unique Theme for Business,
Agency or Creative Portfolios
settings[default_banners][2][image_description] =

Phasellus - ut augue at sapien bibendum bibendum amet magna. Aenean condimentum, lacus sit amet luctus lobortis, enim tellus ultrices elit, amet consequat enim elit noneas.

<a href="#" class="button medium yellow">Read More</a>
 settings[default_banners][2][image_published]   = TRUE
 settings[default_banners][2][image_weight]      = 1
 settings[default_banners][2][image_color]      = #fafafa
 settings[default_banners][2][image_float]      = right
 settings[default_banners][3][image_path]        = images/slider_img_03.png
 settings[default_banners][3][image_title]       = Incredible: Responsive Theme 
Perfect for Showing Your Products
settings[default_banners][3][image_description] =

Nemo enim ipsam voluptatem, quia voluptas sit, aspernatur aut odit aut fugit, sed quia consequuntur magni dolores eos, qui ratione voluptatem sequi nesciunt, neque dolor.

<a href="#" class="button medium yellow">View Project</a>
 settings[default_banners][3][image_published]   = TRUE
 settings[default_banners][3][image_weight]      = 2
 settings[default_banners][3][image_color]      = #fafafa
 settings[default_banners][3][image_float]      = right

Arquivo css/style.css

Arquivo template.tpl.php