[t3con12ca] content model and typoscript in typo3 phoenix
TRANSCRIPT
![Page 1: [T3CON12CA] Content Model and TypoScript in TYPO3 Phoenix](https://reader036.vdocuments.mx/reader036/viewer/2022081403/5550fc9ab4c90501448b4c87/html5/thumbnails/1.jpg)
TYPO3 Phoenix Content model and
TypoScript
Tuesday 26 June 12
![Page 2: [T3CON12CA] Content Model and TypoScript in TYPO3 Phoenix](https://reader036.vdocuments.mx/reader036/viewer/2022081403/5550fc9ab4c90501448b4c87/html5/thumbnails/2.jpg)
Christian Müller
twitter: [email protected]
TYPO3 Freelancer
TYPO3 Phoenix and FLOW3 Core Team Member
Book and Music Freak
Tuesday 26 June 12
![Page 3: [T3CON12CA] Content Model and TypoScript in TYPO3 Phoenix](https://reader036.vdocuments.mx/reader036/viewer/2022081403/5550fc9ab4c90501448b4c87/html5/thumbnails/3.jpg)
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 4: [T3CON12CA] Content Model and TypoScript in TYPO3 Phoenix](https://reader036.vdocuments.mx/reader036/viewer/2022081403/5550fc9ab4c90501448b4c87/html5/thumbnails/4.jpg)
Content Model
Tuesday 26 June 12
![Page 5: [T3CON12CA] Content Model and TypoScript in TYPO3 Phoenix](https://reader036.vdocuments.mx/reader036/viewer/2022081403/5550fc9ab4c90501448b4c87/html5/thumbnails/5.jpg)
Nodes
Tuesday 26 June 12
![Page 6: [T3CON12CA] Content Model and TypoScript in TYPO3 Phoenix](https://reader036.vdocuments.mx/reader036/viewer/2022081403/5550fc9ab4c90501448b4c87/html5/thumbnails/6.jpg)
are
• hierarchical structure
• actual content is schema less
• representing pages, content elements or anything else you want to include in the tree
Tuesday 26 June 12
![Page 7: [T3CON12CA] Content Model and TypoScript in TYPO3 Phoenix](https://reader036.vdocuments.mx/reader036/viewer/2022081403/5550fc9ab4c90501448b4c87/html5/thumbnails/7.jpg)
can besite root
page
content section
content element
representation of domain models
and just anything you want them to be!
Tuesday 26 June 12
![Page 8: [T3CON12CA] Content Model and TypoScript in TYPO3 Phoenix](https://reader036.vdocuments.mx/reader036/viewer/2022081403/5550fc9ab4c90501448b4c87/html5/thumbnails/8.jpg)
can besite root
page
content section
content element
representation of domain models
and just anything you want them to be!
Tuesday 26 June 12
![Page 9: [T3CON12CA] Content Model and TypoScript in TYPO3 Phoenix](https://reader036.vdocuments.mx/reader036/viewer/2022081403/5550fc9ab4c90501448b4c87/html5/thumbnails/9.jpg)
are addressed by nodePaths
/sites/typo3org/home/subpage/main/text1
Tuesday 26 June 12
![Page 10: [T3CON12CA] Content Model and TypoScript in TYPO3 Phoenix](https://reader036.vdocuments.mx/reader036/viewer/2022081403/5550fc9ab4c90501448b4c87/html5/thumbnails/10.jpg)
are addressed by nodePaths
/sites/typo3org/home/subpage/main/text1
site root
Tuesday 26 June 12
![Page 11: [T3CON12CA] Content Model and TypoScript in TYPO3 Phoenix](https://reader036.vdocuments.mx/reader036/viewer/2022081403/5550fc9ab4c90501448b4c87/html5/thumbnails/11.jpg)
are addressed by nodePaths
/sites/typo3org/home/subpage/main/text1
site root
pages
Tuesday 26 June 12
![Page 12: [T3CON12CA] Content Model and TypoScript in TYPO3 Phoenix](https://reader036.vdocuments.mx/reader036/viewer/2022081403/5550fc9ab4c90501448b4c87/html5/thumbnails/12.jpg)
are addressed by nodePaths
/sites/typo3org/home/subpage/main/text1
site root
pages
section
Tuesday 26 June 12
![Page 13: [T3CON12CA] Content Model and TypoScript in TYPO3 Phoenix](https://reader036.vdocuments.mx/reader036/viewer/2022081403/5550fc9ab4c90501448b4c87/html5/thumbnails/13.jpg)
are addressed by nodePaths
/sites/typo3org/home/subpage/main/text1
site root
pages
section
content
Tuesday 26 June 12
![Page 14: [T3CON12CA] Content Model and TypoScript in TYPO3 Phoenix](https://reader036.vdocuments.mx/reader036/viewer/2022081403/5550fc9ab4c90501448b4c87/html5/thumbnails/14.jpg)
Context
Tuesday 26 June 12
![Page 15: [T3CON12CA] Content Model and TypoScript in TYPO3 Phoenix](https://reader036.vdocuments.mx/reader036/viewer/2022081403/5550fc9ab4c90501448b4c87/html5/thumbnails/15.jpg)
is
• an environment a node exists in
• for example a workspace
Tuesday 26 June 12
![Page 16: [T3CON12CA] Content Model and TypoScript in TYPO3 Phoenix](https://reader036.vdocuments.mx/reader036/viewer/2022081403/5550fc9ab4c90501448b4c87/html5/thumbnails/16.jpg)
therefor
• same node can exist in multiple contexts
Tuesday 26 June 12
![Page 17: [T3CON12CA] Content Model and TypoScript in TYPO3 Phoenix](https://reader036.vdocuments.mx/reader036/viewer/2022081403/5550fc9ab4c90501448b4c87/html5/thumbnails/17.jpg)
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 18: [T3CON12CA] Content Model and TypoScript in TYPO3 Phoenix](https://reader036.vdocuments.mx/reader036/viewer/2022081403/5550fc9ab4c90501448b4c87/html5/thumbnails/18.jpg)
typo3.org
homepage section:mainen_ENen_EN
maincontenten_EN
typo3.org
homepage section:mainen_ENen_EN
maincontenten_EN
Lorem ipsum dolor sit amet
Lorem ipsum dolor sit amet
“live” workspace
“user-christian” workspace
Tuesday 26 June 12
![Page 19: [T3CON12CA] Content Model and TypoScript in TYPO3 Phoenix](https://reader036.vdocuments.mx/reader036/viewer/2022081403/5550fc9ab4c90501448b4c87/html5/thumbnails/19.jpg)
typo3.org
homepage section:mainen_ENen_EN
maincontenten_EN
typo3.org
homepage section:mainen_ENen_EN
maincontenten_EN
Lorem ipsum dolor sit amet
Some real content text here
“live” workspace
“user-christian” workspace
Tuesday 26 June 12
![Page 20: [T3CON12CA] Content Model and TypoScript in TYPO3 Phoenix](https://reader036.vdocuments.mx/reader036/viewer/2022081403/5550fc9ab4c90501448b4c87/html5/thumbnails/20.jpg)
'TYPO3.TYPO3:Text': superTypes: ['TYPO3.TYPO3:ContentObject'] group: 'General' icon: 'Images/Icons/White/text.png' label: 'Text'
properties: headline: label: string default: 'Enter headline here' text: label: string default: '<p>Enter text here</p>'
inlineEditableProperties: ['headline', 'text']
content configuration
Tuesday 26 June 12
![Page 21: [T3CON12CA] Content Model and TypoScript in TYPO3 Phoenix](https://reader036.vdocuments.mx/reader036/viewer/2022081403/5550fc9ab4c90501448b4c87/html5/thumbnails/21.jpg)
TypoScript 2
• Convention over Configuration
• no TypoScript in database
• Sub directories as in Node Hierarchy to add extension templates
Tuesday 26 June 12
![Page 22: [T3CON12CA] Content Model and TypoScript in TYPO3 Phoenix](https://reader036.vdocuments.mx/reader036/viewer/2022081403/5550fc9ab4c90501448b4c87/html5/thumbnails/22.jpg)
What do we want to do with TypoScript?
Tuesday 26 June 12
![Page 23: [T3CON12CA] Content Model and TypoScript in TYPO3 Phoenix](https://reader036.vdocuments.mx/reader036/viewer/2022081403/5550fc9ab4c90501448b4c87/html5/thumbnails/23.jpg)
render containers output properties
render nodes
rend
er g
roup
s of n
odes
select nodes
wrap contentconfigure output
filter nodes
exte
nd it
rend
er m
enus
Tuesday 26 June 12
![Page 24: [T3CON12CA] Content Model and TypoScript in TYPO3 Phoenix](https://reader036.vdocuments.mx/reader036/viewer/2022081403/5550fc9ab4c90501448b4c87/html5/thumbnails/24.jpg)
Boils down to
• mainly dealing with nodes
• but not always involving a node
• nodes can be rendered multiple times
• flexibility needed
• hierarchical access to nodes
Tuesday 26 June 12
![Page 25: [T3CON12CA] Content Model and TypoScript in TYPO3 Phoenix](https://reader036.vdocuments.mx/reader036/viewer/2022081403/5550fc9ab4c90501448b4c87/html5/thumbnails/25.jpg)
• TypoScript v4: extensibility, stdWrap
• Fluid: HTML Templating
• JavaScript: Prototype-based inheritance
• jQuery: selecting nodes, fluent interface
• CSS: set-based API; Selector Syntax
• XPath: Traversal Operations
Inspirations
Tuesday 26 June 12
![Page 26: [T3CON12CA] Content Model and TypoScript in TYPO3 Phoenix](https://reader036.vdocuments.mx/reader036/viewer/2022081403/5550fc9ab4c90501448b4c87/html5/thumbnails/26.jpg)
Out-Of-Band Rendering
• Rendering single content elements
• needs: side-effect-free language
• needs: compact addressing
• Node Path: /sites/flow3org/home[TYPO3.TYPO3:Page]
• TypoScript Path: page/body
Tuesday 26 June 12
![Page 27: [T3CON12CA] Content Model and TypoScript in TYPO3 Phoenix](https://reader036.vdocuments.mx/reader036/viewer/2022081403/5550fc9ab4c90501448b4c87/html5/thumbnails/27.jpg)
Pagepage = TYPO3.TYPO3:Pagepage.body.templatePath = 'resource://My.Site/Private/ ↵Templates/Page/Default.html'page.body.sectionName = 'body'
TypoScript 2
page = PAGEpage.10 = TEMPLATEpage.10.template = FILEpage.10.template.file = fileadmin/templates/default.htmlpage.10.workOnSubpart = bodypage.10.marks …
TypoScript
Tuesday 26 June 12
![Page 28: [T3CON12CA] Content Model and TypoScript in TYPO3 Phoenix](https://reader036.vdocuments.mx/reader036/viewer/2022081403/5550fc9ab4c90501448b4c87/html5/thumbnails/28.jpg)
Content
page.body.sections.main = TYPO3.TYPO3:Sectionpage.body.sections.main.nodePath = 'main'
TypoScript 2
page.10.marks.maincontent = CONTENTpage.10.marks.maincontent.table = tt_contentpage.10.marks.maincontent.select.where = colPos = 0
(page.10.marks.maincontent < styles.content.get)
TypoScript
Tuesday 26 June 12
![Page 29: [T3CON12CA] Content Model and TypoScript in TYPO3 Phoenix](https://reader036.vdocuments.mx/reader036/viewer/2022081403/5550fc9ab4c90501448b4c87/html5/thumbnails/29.jpg)
Menu
page.body.parts { menu = TYPO3.TYPO3:MenuRenderer}
TypoScript 2
page.10.marks.menu = HMENUpage.10.marks.menu {1 = TMENU1.wrap = <ul class=”nav”>|</div>1.NO.wrapItemAndSub = <li>|</li>1.CUR = 11.CUR.wrapItemAndSub = <li class=”current”>|</li>
}
TypoScript
Tuesday 26 June 12
![Page 30: [T3CON12CA] Content Model and TypoScript in TYPO3 Phoenix](https://reader036.vdocuments.mx/reader036/viewer/2022081403/5550fc9ab4c90501448b4c87/html5/thumbnails/30.jpg)
FlowQuery
Tuesday 26 June 12
![Page 31: [T3CON12CA] Content Model and TypoScript in TYPO3 Phoenix](https://reader036.vdocuments.mx/reader036/viewer/2022081403/5550fc9ab4c90501448b4c87/html5/thumbnails/31.jpg)
FlowQuery
• Selector syntax like jQuery for TYPO3
• working with a context (usually a node)
${context.property('text')}
Tuesday 26 June 12
![Page 32: [T3CON12CA] Content Model and TypoScript in TYPO3 Phoenix](https://reader036.vdocuments.mx/reader036/viewer/2022081403/5550fc9ab4c90501448b4c87/html5/thumbnails/32.jpg)
Traversal
// return first node in subnode with path
// ‘left’
${context.children('left').first()}
${context.children().filter('left').first()}
// return collection of all parents (rootline)
${context.parents()}
Tuesday 26 June 12
![Page 33: [T3CON12CA] Content Model and TypoScript in TYPO3 Phoenix](https://reader036.vdocuments.mx/reader036/viewer/2022081403/5550fc9ab4c90501448b4c87/html5/thumbnails/33.jpg)
Processors
Tuesday 26 June 12
![Page 34: [T3CON12CA] Content Model and TypoScript in TYPO3 Phoenix](https://reader036.vdocuments.mx/reader036/viewer/2022081403/5550fc9ab4c90501448b4c87/html5/thumbnails/34.jpg)
are
• replacing stdWrap
• usable everywhere
• easy to create by yourself
prototype(TYPO3.TYPO3:Text).headline << 1.wrap(prefix: '-', suffix: '-')
Tuesday 26 June 12