[T3CON12CA] Content Model and TypoScript in TYPO3 Phoenix
Upcoming SlideShare
Loading in...5
×
 

[T3CON12CA] Content Model and TypoScript in TYPO3 Phoenix

on

  • 1,255 views

 

Statistics

Views

Total Views
1,255
Views on SlideShare
1,253
Embed Views
2

Actions

Likes
0
Downloads
2
Comments
0

1 Embed 2

http://www.linkedin.com 2

Accessibility

Categories

Upload Details

Uploaded via as Adobe PDF

Usage Rights

© All Rights Reserved

Report content

Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
  • Full Name Full Name Comment goes here.
    Are you sure you want to
    Your message goes here
    Processing…
Post Comment
Edit your comment

[T3CON12CA] Content Model and TypoScript in TYPO3 Phoenix [T3CON12CA] Content Model and TypoScript in TYPO3 Phoenix Presentation Transcript

  • TYPO3 Phoenix Content model and TypoScriptTuesday 26 June 12
  • Christian Müller TYPO3 Freelancer TYPO3 Phoenix and FLOW3 Core Team Member Book and Music Freak twitter: daskitsunet christian.mueller@typo3.orgTuesday 26 June 12
  • 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 yearTuesday 26 June 12
  • Content ModelTuesday 26 June 12
  • NodesTuesday 26 June 12
  • are • hierarchical structure • actual content is schema less • representing pages, content elements or anything else you want to include in the treeTuesday 26 June 12
  • can be site root page content section content element representation of domain modelsTuesday 26 June 12
  • can be site root page and just anything content section you want them to be! content element representation of domain modelsTuesday 26 June 12
  • are addressed by nodePaths /sites/typo3org/home/subpage/main/text1Tuesday 26 June 12
  • are addressed by nodePaths /sites/typo3org/home/subpage/main/text1 site rootTuesday 26 June 12
  • are addressed by nodePaths /sites/typo3org/home/subpage/main/text1 site root pagesTuesday 26 June 12
  • are addressed by nodePaths /sites/typo3org/home/subpage/main/text1 site root section pagesTuesday 26 June 12
  • are addressed by nodePaths /sites/typo3org/home/subpage/main/text1 site root section pages contentTuesday 26 June 12
  • ContextTuesday 26 June 12
  • is • an environment a node exists in • for example a workspaceTuesday 26 June 12
  • therefor • same node can exist in multiple contextsTuesday 26 June 12
  • typo3.org en_EN en_EN en_EN homepage section:main maincontent Lorem ipsum dolor sit amet en_EN en_EN section:side sidecontent Lorem ipsum dolor sit amet de_DE de_DE section:side sidecontent Lorem ipsum dolor sit ametTuesday 26 June 12
  • typo3.org en_EN en_EN en_EN homepage section:main maincontent Lorem ipsum dolor sit amet “live” workspace typo3.org en_EN en_EN en_EN homepage section:main maincontent Lorem ipsum dolor sit amet “user-christian” workspaceTuesday 26 June 12
  • typo3.org en_EN en_EN en_EN homepage section:main maincontent Lorem ipsum dolor sit amet “live” workspace typo3.org en_EN en_EN en_EN homepage section:main maincontent Some real content text here “user-christian” workspaceTuesday 26 June 12
  • content configuration 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]Tuesday 26 June 12
  • TypoScript 2 • Convention over Configuration • no TypoScript in database • Sub directories as in Node Hierarchy to add extension templatesTuesday 26 June 12
  • What do we want to do with TypoScript?Tuesday 26 June 12
  • containers ou rende r tput pro re pe rti t nde es wr nd i ap r es exte nod od c on n con te es of figu nt re o s up utput s es ro nu tn od g me lec r se de filter nodes r de n re nTuesday 26 June 12 re
  • Boils down to • mainly dealing with nodes • but not always involving a node • nodes can be rendered multiple times • flexibility needed • hierarchical access to nodesTuesday 26 June 12
  • Inspirations • TypoScript v4: extensibility, stdWrap • Fluid: HTML Templating • JavaScript: Prototype-based inheritance • jQuery: selecting nodes, fluent interface • CSS: set-based API; Selector Syntax • XPath: Traversal OperationsTuesday 26 June 12
  • 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/bodyTuesday 26 June 12
  • Page TypoScript 2 page = TYPO3.TYPO3:Page page.body.templatePath = resource://My.Site/Private/ ↵ Templates/Page/Default.html page.body.sectionName = body TypoScript page = PAGE page.10 = TEMPLATE page.10.template = FILE page.10.template.file = fileadmin/templates/default.html page.10.workOnSubpart = body page.10.marks …Tuesday 26 June 12
  • Content TypoScript 2 page.body.sections.main = TYPO3.TYPO3:Section page.body.sections.main.nodePath = main TypoScript page.10.marks.maincontent = CONTENT page.10.marks.maincontent.table = tt_content page.10.marks.maincontent.select.where = colPos = 0 (page.10.marks.maincontent < styles.content.get)Tuesday 26 June 12
  • Menu TypoScript 2 page.body.parts { menu = TYPO3.TYPO3:MenuRenderer } TypoScript page.10.marks.menu = HMENU page.10.marks.menu { 1 = TMENU 1.wrap = <ul class=”nav”>|</div> 1.NO.wrapItemAndSub = <li>|</li> 1.CUR = 1 1.CUR.wrapItemAndSub = <li class=”current”>|</li> }Tuesday 26 June 12
  • FlowQueryTuesday 26 June 12
  • FlowQuery • Selector syntax like jQuery for TYPO3 • working with a context (usually a node) ${context.property(text)}Tuesday 26 June 12
  • 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
  • ProcessorsTuesday 26 June 12
  • are • replacing stdWrap • usable everywhere • easy to create by yourself prototype(TYPO3.TYPO3:Text).headline << 1.wrap(prefix: -, suffix: -)Tuesday 26 June 12
  • Thank you! Questions? twitter: @daskitsunet email: christian.mueller@typo3.orgTuesday 26 June 12