drupal theming

32
Drupal Theming [email protected]

Upload: hachi

Post on 31-Jan-2016

54 views

Category:

Documents


0 download

DESCRIPTION

Drupal Theming. [email protected]. Themes. Control del diseño HTML, CSS, imágenes, Javascript, etc. Drupal “Theming”. Apariencia : Photoshop, Illustrator, Fireworks, etc. Hojas de estilo (CSS) Adaptar HTML generado por drupal. 3 pasos. Info Files (.info) Template Files (.tpl.php) - PowerPoint PPT Presentation

TRANSCRIPT

Page 2: Drupal Theming

Themes

•Control del diseño

•HTML, CSS, imágenes, Javascript, etc.

Page 3: Drupal Theming

Drupal “Theming”

•Apariencia : Photoshop, Illustrator, Fireworks, etc.

•Hojas de estilo (CSS)

•Adaptar HTML generado por drupal

Page 4: Drupal Theming

3 pasos

1.Info Files (.info)

2. Template Files (.tpl.php)

3.Adaptar funciones

Page 5: Drupal Theming

Estructura Theme

Page 6: Drupal Theming

Estructura Theme1. Info File

2. Template Files .tlp.php

3. Funciones y variables.

Page 7: Drupal Theming

Primer Paso: .Info File

•Nombre y descripción

• Screenshot ó imagen

•Core (Versión Drupal)

•CSS

•Regiones

• Features “Características”

Page 8: Drupal Theming

Nombre y descripción

name = Drupal México

description = Theme elaborado en el taller de Drupal

Page 9: Drupal Theming

Screenshotscreenshot = images/screenshot.png

Page 10: Drupal Theming

Core

core = 6.xbase theme = zen

Page 11: Drupal Theming

CSSstylesheets[all][] = styles.css

Page 12: Drupal Theming

Definir Regiones

regions[left] = left sidebar

regions[right] = right sidebar

regions[navbar] = navigation bar

regions[content_top] = content top

regions[header] = header

regions[footer] = footer

Page 13: Drupal Theming

Características

features[] = logo

features[] = name

features[] = slogan

Page 14: Drupal Theming

2 paso : Template Files (.tpl.php)

Existen 5 templates básicos

Page.tpl.php

block.tpl.php

node.tpl.php

box.tpl.php

comment.tpl.php

Page 15: Drupal Theming

Templates Básicos

Page.tpl.php

Page 16: Drupal Theming

Templates Básicos

block.tpl.php

Page 17: Drupal Theming

Templates Básicos

node.tpl.php

Page 18: Drupal Theming

Templates Básicos

box.tpl.php

Page 19: Drupal Theming

Templates Básicos

comment.tpl.php

Page 20: Drupal Theming

Templates dinámicos

Duplicar node.tpl.php

Reenombrar node-nodetype.tpl.php

node-blog.tpl.php

Page 21: Drupal Theming

Templates dinámicos

Front disponible en Drupal 6.-x

Page 22: Drupal Theming

Templates dinámicos

Page 23: Drupal Theming

Templates dinámicos

Importante! Copiar desde el Core al Theme

Page 24: Drupal Theming

Templates dinámicos

Page 25: Drupal Theming

3 Paso: Funcionestemplate.tpl.php

Consultar API Drupal

http://api.drupal.org

Page 26: Drupal Theming

Zen & 960.gs

Page 27: Drupal Theming

¿Que demonios es Zen?

Theme Framework

http://drupal.org/project/zen

Page 28: Drupal Theming

Zen Garden

http://www.csszengarden.com/

Page 29: Drupal Theming

960.gsCSS Framework

Basado en grid de 12 y 16 columnas

Page 30: Drupal Theming

960.gs Clases CSS•container

•grid•prefix•suffix•alpha•omega

Page 31: Drupal Theming

960.gs ejemplos<div id="page" class="container-16 clear-

block">

CONTENIDO

</div>

Page 32: Drupal Theming

960.gsArea disponible 940 px

Padding 10 px por lado