SlideShare a Scribd company logo
How to create a Drupal theme
           Nicky Rutten
Nicky Rutten



Founder / Creative director @ Prêt à utiliser



Docent @ Karel de Grote Hogeschool



Webdesign, typografie, sigaren, whisky en basketball




                                                      @ruttennicky
                                                2
Prêt à utiliser



Digital agency



Opleidingen & consultancy



Webdesign & development



Mobile


                            3
We really love Drupal !
                          4
Drupal theming



Presentatie laag



Geen website maar web systeem



Wireframes zijn cruciaal (structuur)



Consistentie is belangrijk


                                       5
Drupal theming



Altijd in sites/all/themes !




                               6
Drupal theming



Verzameling van bestanden (thema.info, *.tpl.php, template.php)



HTML met stukjes PHP (Drupal zet de PHP om in inhoud)



vb: Themanaam = dcg2012


          Map : dcg2012

              Bestand : dcg2012.info
              Bestand : page.tpl.php
              ...                                    7
Jummy !




          8
9
How to create a Drupal theme (Dut
<html>

 <body>


    <article>   <aside>




                <aside>
html.tpl.php

  page.tpl.php


     node.tpl.php   block.tpl.php




                    block.tpl.php
.info file (verplicht)



Altijd de naam van de theme en map (vb : dcg2012 & dcg2012.info)



Definitie van:


          Thema details (naam, versie, ...)
          CSS bestanden
          JavaScript bestanden
          Thema regio’s
          Thema opties (logo, slogan, ...)
html.tpl.php



!Doctype    (Standaard: xHTML + RDFa)




Header: CSS + JavaScript + Favicon + Meta + ...



Body container (alleen de container, GEEN inhoud)
page.tpl.php



Inhoud van de <body> container



Uitprinten van regio’s (gedefinieerd in het .info bestand)



Gebruik altijd <?php print render($page[‘...’]); ?> voor regio’s



Variabelen : $is_front, $logged_in, $logo, $front_page, ...
node.tpl.php



Inhoud van een werkelijk " artikel "



Voorkeur aan modules : Display Suite, panels and views
comment.tpl.php

Opmaak van comments bij een node




field.tpl.php

Opmaak van aangepaste velden van een node




region.tpl.php

Meestal een verzameling van blokken
html.tpl.php

  page.tpl.php
                       region.tpl.php
     node.tpl.php       block.tpl.php




      field.tpl.php




                        block.tpl.php



     comment.tpl.php
Template suggesties



Greatest thing since ... hot water !



Specifiek .tpl.php bestand per pagina, node, veld, ....



Voor elk .tpl.php bestand



Achteraf cache leegmaken
Template suggesties



page--front.tpl.php



node--54.tpl.php



field--field--veldnaam.tpl.php
Showtime !
Tools



Firebug & web developer toolbar



Devel (http://drupal.org/project/devel)



Devel Themer (http://drupal.org/project/devel_themer)
Tips



Cache vaak wissen !



Niets overschrijven wat niet overschreven moet worden



Gebruik een cheatsheet



Wees consequent (HTML, PHP, CSS, JS, Drupal, ...)



Gebruik modules zoals views, display suite, panels , ...
Bestanden op www.pretautiliser.be/docs/dcg2012/files.zip
Vragen ?
Bedankt !
Feedback & follow-up:
http://drupalcampgent.be/feedback

More Related Content

PPTX
Drupal 6 Theming
PDF
Drupal 7 Theming
ODP
Workshop theming DrupalJam 2007
PDF
Drupal8
PDF
Drupal6 Css Theming
PDF
Powerpoint Htmlcss
PDF
Html css
ODP
Drupal7 Development
Drupal 6 Theming
Drupal 7 Theming
Workshop theming DrupalJam 2007
Drupal8
Drupal6 Css Theming
Powerpoint Htmlcss
Html css
Drupal7 Development

Similar to How to create a Drupal theme (Dut (20)

PDF
Drupal7 Theming
ODP
General Drupal presentation in Dutch
PDF
1.7 terugblik module 1
PPT
Lucius Drupal Development Cursus
PPTX
Zelf je Joomla! template bouwen voor beginners
PPTX
Drupal + Open Atrium bij de Vlaamse Erfgoedbibliotheek
PPSX
Drupal introductie - GoalGorilla - Oxilion Lunch &amp; Learn
PPTX
Eindwerk presentatie - Stage bij Duo nv
PPT
Lucius Websystems Drupal Startersdag
PPT
2013 14-05 - drupal multisite - drupal jam 2013
ODP
Introductie Drupal development
PPTX
NL Front-end Guidelines (HTML,CSS,Javascript)
PDF
Drupal 7 Architectuur
PDF
[Idm b] tools databases 3
PDF
InDesign interactive
PPTX
Joomla backend-beheer vereenvoudigen - Joomladagen 2016
PPT
Drupal Uitgebreide Starters Training
PPTX
1.1 html css introductie
ODP
Drupal introductie voor NCRV-i
PPTX
Templates maken met helix framework Joomla User Group Utrecht 10 november 2014
Drupal7 Theming
General Drupal presentation in Dutch
1.7 terugblik module 1
Lucius Drupal Development Cursus
Zelf je Joomla! template bouwen voor beginners
Drupal + Open Atrium bij de Vlaamse Erfgoedbibliotheek
Drupal introductie - GoalGorilla - Oxilion Lunch &amp; Learn
Eindwerk presentatie - Stage bij Duo nv
Lucius Websystems Drupal Startersdag
2013 14-05 - drupal multisite - drupal jam 2013
Introductie Drupal development
NL Front-end Guidelines (HTML,CSS,Javascript)
Drupal 7 Architectuur
[Idm b] tools databases 3
InDesign interactive
Joomla backend-beheer vereenvoudigen - Joomladagen 2016
Drupal Uitgebreide Starters Training
1.1 html css introductie
Drupal introductie voor NCRV-i
Templates maken met helix framework Joomla User Group Utrecht 10 november 2014
Ad

How to create a Drupal theme (Dut

Editor's Notes