[t3con12ca] typo3 phoenix templating workshop

22
Tuesday 26 June 12

Upload: christian-mueller

Post on 12-May-2015

491 views

Category:

Technology


1 download

TRANSCRIPT

Page 1: [T3CON12CA] TYPO3 Phoenix Templating Workshop

Tuesday 26 June 12

Page 2: [T3CON12CA] TYPO3 Phoenix Templating Workshop

Integrating Websites with Phoenix

Tuesday 26 June 12

Page 3: [T3CON12CA] TYPO3 Phoenix Templating Workshop

Christian Müller

twitter: [email protected]

TYPO3 Freelancer

TYPO3 Phoenix and FLOW3 Core Team Member

Book and Music Freak

Tuesday 26 June 12

Page 4: [T3CON12CA] TYPO3 Phoenix Templating Workshop

Phoenix?

• Next generation Content Management System from the TYPO3 community

• build on top of FLOW3 as framework

• Content Repository approach

• Aloha editor

• alpha, estimated arrival later this year

Tuesday 26 June 12

Page 5: [T3CON12CA] TYPO3 Phoenix Templating Workshop

DEMO ☛

Tuesday 26 June 12

Page 6: [T3CON12CA] TYPO3 Phoenix Templating Workshop

Content Model

Tuesday 26 June 12

Page 7: [T3CON12CA] TYPO3 Phoenix Templating Workshop

typo3.org

homepage section:main

section:side

section:side

en_EN

en_ENen_EN

de_DE

maincontenten_EN

sidecontenten_EN

sidecontentde_DE

Lorem ipsum dolor sit amet

Lorem ipsum dolor sit amet

Lorem ipsum dolor sit amet

Tuesday 26 June 12

Page 8: [T3CON12CA] TYPO3 Phoenix Templating Workshop

Organise template data?

Tuesday 26 June 12

Page 9: [T3CON12CA] TYPO3 Phoenix Templating Workshop

Current TYPO3

• missing a clean structure for templates

• fileadmin in TYPO3 mixes templates and user data

• no defined folder structure

• TypoScript in files and/or database

Tuesday 26 June 12

Page 10: [T3CON12CA] TYPO3 Phoenix Templating Workshop

Site Package!

Tuesday 26 June 12

Page 11: [T3CON12CA] TYPO3 Phoenix Templating Workshop

FLOW3 Package

• defined folder structure

• easily versioned

• outside web root

• easy for everyone knowing FLOW3

Tuesday 26 June 12

Page 12: [T3CON12CA] TYPO3 Phoenix Templating Workshop

Site Package Contents

• Templates

• StyleSheets

• Images

• JavaScript

• TypoScript

• (Configuration)

Tuesday 26 June 12

Page 13: [T3CON12CA] TYPO3 Phoenix Templating Workshop

Folder structure

Tuesday 26 June 12

Page 14: [T3CON12CA] TYPO3 Phoenix Templating Workshop

Fluid Templates

• as used by extbase

• contain your page layout

• used by TypoScript

Tuesday 26 June 12

Page 15: [T3CON12CA] TYPO3 Phoenix Templating Workshop

Sites.xml

• Contains Page and Content Structure (Nodes)

• At the moment needed for initial setup of your node tree

Tuesday 26 June 12

Page 16: [T3CON12CA] TYPO3 Phoenix Templating Workshop

TypoScript

• Convention over Configuration

• no TypoScript in database

• Sub directories as in Node Hierarchy to add extension templates

Tuesday 26 June 12

Page 17: [T3CON12CA] TYPO3 Phoenix Templating Workshop

TypoScript 2Quick Introduction

Tuesday 26 June 12

Page 18: [T3CON12CA] TYPO3 Phoenix Templating Workshop

Pagepage = TYPO3.TYPO3:Pagepage.body.templatePath = 'resource://My.Site/Private/ ↵Templates/Page/Default.html'page.body.sectionName = 'body'

TypoScript

<!DOCTYPE html><html>...<body><f:section name="body"></f:section></body></html>

HTML

Tuesday 26 June 12

Page 19: [T3CON12CA] TYPO3 Phoenix Templating Workshop

Content

page.body.sections.main = TYPO3.TYPO3:Sectionpage.body.sections.main.nodePath = 'main'

TypoScript

<f:section name="body"><ts:renderTypoScript path="sections/main" /></f:section>

HTML

Tuesday 26 June 12

Page 20: [T3CON12CA] TYPO3 Phoenix Templating Workshop

Menu

page.body.parts { menu = TYPO3.TYPO3:MenuRenderer}

TypoScript

<f:section name="body"><ts:renderTypoScript path="parts/menu" /></f:section>

HTML

Tuesday 26 June 12

Page 21: [T3CON12CA] TYPO3 Phoenix Templating Workshop

Tuesday 26 June 12

Page 22: [T3CON12CA] TYPO3 Phoenix Templating Workshop

Getting Phoenixgit clone git://git.typo3.org/TYPO3v5/↵ Distributions/Base.git Phoenix

cd Phoenix/Packages/Application

git clone git://git.typo3.org/FLOW3/Packages/↵ TYPO3.SiteKickstarter.git

setup a virtual host pointing to “Web” directory, so apart from the repository much the same as installing FLOW3 from git

or use the virtual machine

Tuesday 26 June 12