Upgrade to Pro — share decks privately, control downloads, hide ads and more …

Introduktion til Neos - TYPO3 Camp Danmark

Introduktion til Neos - TYPO3 Camp Danmark

Aske Ertmann

March 15, 2013
Tweet

More Decks by Aske Ertmann

Other Decks in Programming

Transcript

  1. jQuery jQuery UI Twitter Bootstrap Plupload Ember.js Create.js Chosen Codemirror

    Dynatree Underscore.js Font Awesome jCrop Hallo jQuery popover jQuery Hotkeys spin.js VIE Aloha Backbone RequireJS Friday, March 15, 13
  2. Mål Gem, læs og opdater dybt strukturede indhold på en

    generel måde. Versioner, oversæt, synkroniser. Content Repository TYPO3.TYPO3CR Friday, March 15, 13
  3. Mål Gem, læs og opdater dybt strukturede indhold på en

    generel måde. Versioner, oversæt, synkroniser. Content Repository TYPO3.TYPO3CR baseret på noder Friday, March 15, 13
  4. Mål Gem, læs og opdater dybt strukturede indhold på en

    generel måde. Versioner, oversæt, synkroniser. Content Repository TYPO3.TYPO3CR baseret på noder hierarkisk struktur Friday, March 15, 13
  5. Mål Gem, læs og opdater dybt strukturede indhold på en

    generel måde. Versioner, oversæt, synkroniser. Content Repository TYPO3.TYPO3CR baseret på noder hierarkisk struktur workspace support Friday, March 15, 13
  6. Mål Gem, læs og opdater dybt strukturede indhold på en

    generel måde. Versioner, oversæt, synkroniser. Content Repository TYPO3.TYPO3CR baseret på noder hierarkisk struktur workspace support oversættelse support Friday, March 15, 13
  7. first Text headline Title text main Section screen Image uri

    screenshot.jpg caption The Login of Neos homepage Page title Neos Demo Page Friday, March 15, 13
  8. first Text headline Try Out Neos Today! text Fetch the

    Download and run it ... user-sebastian main Section screen Image uri screenshot.jpg caption The Login of Neos homepage Page title Neos Demo Page two TwoColumn user-sebastian Friday, March 15, 13
  9. first Text headline Title text main Section screen Image uri

    screenshot.jpg caption The Login of Neos homepage Page title Neos Demo Page two TwoColumn Friday, March 15, 13
  10. TYPO3CR Content Types TYPO3.Neos.ContentTypes/Configuration/NodeTypes.yaml 'TYPO3.Neos.ContentTypes:Text': superTypes: ['TYPO3.Neos.ContentTypes:ContentObject'] ui: label: 'Text'

    group: 'General' icon: light: 'Images/Icons/White/doc_lines_stright_icon-16.png' dark: 'Images/Icons/Black/doc_lines_stright_icon-16.png' properties: text: type: string defaultValue: '<p>Enter text here</p>' ui: inlineEditable: true Friday, March 15, 13
  11. Brug af TYPO3CR // Setup $contentContext = new \TYPO3\TYPO3CR\Domain\Service\Context('live'); $nodeRepository->setContext($contentContext);

    $rootNode = $contentContext->getWorkspace()->getRootNode(); // Traversing the node tree $testNode = $rootNode->createNode('test'); $fooNode = $testNode->createNode('foo'); $fooNode->setProperty('title', 'Hello World'); $rootNode->getNode('test/foo'); // == $fooNode Friday, March 15, 13
  12. Acme.Demo/Resources/Private/TypoScripts/Library/Root.ts2 // Includes TYPO3.Neos/Private/DefaultTypoScript/All.ts2 page = Page page.body { templatePath

    = 'resource://Acme.Demo/Private/Templates/Page.html' sectionName = 'body' } Rendering af en statisk side Acme.Demo/Resources/Private/Templates/Page.html <f:section name="body"> <h1>A freshly created template for your new site!</h1> </f:section> Friday, March 15, 13
  13. Rendering af en side Acme.Demo/Resources/Private/TypoScripts/Library/Root.ts2 // Includes TYPO3.TYPO3/Private/DefaultTypoScript/All.ts2 page =

    Page // ... page.body { templatePath = 'resource://Acme.Demo/Private/Templates/Page.html' sectionName = 'body' parts { menu = Menu breadcrumb = Breadcrumb } sections { main = Section main.nodePath = 'main' } } Friday, March 15, 13
  14. Acme.Demo/Resources/Private/Templates/Page.html {namespace ts=TYPO3\TypoScript\ViewHelpers} <f:section name="body"> <h1>A freshly created template for

    your new site!</h1> <nav class="menu"><ts:renderTypoScript path="parts/menu" /></nav> <nav class="breadcrumb"> <ts:renderTypoScript path="parts/breadcrumb" /> </nav> <div class="content"><ts:renderTypoScript path="sections/main" /></div> </f:section> Rendering af en side Friday, March 15, 13
  15. TODO add image of Acme.Demo package (ugly) -> then add

    new image for Phoenix Demo Site Friday, March 15, 13
  16. TYPO3.Neos.ContentTypes/Resources/Private/TypoScript/Root.ts2 Defination af en side # Page TS Object prototype(TYPO3.Neos.ContentTypes:Page)

    < prototype(TYPO3.TypoScript:Template) prototype(TYPO3.Neos.ContentTypes:Page) { templatePath = 'resource://TYPO3.Neos.ContentTypes/Private/Templates/TypoScriptObjects/ PageTemplate.html' body = TYPO3.TypoScript:Template body.title = ${q(node).property('title')} body.nodePath = ${q(node).property('_path')} headerData = TYPO3.TypoScript:Array backendHeader = TYPO3.TypoScript:Template backendHeader.templatePath = 'resource://TYPO3.Neos.ContentTypes/Private/Templates/ TypoScriptObjects/PageHead.html' htmlAttributes = '' } Friday, March 15, 13
  17. Refe- rence q(node).property("title") Goal Provide helper functions for working with

    TYPO3CR nodes in Eel like jQuery for JavaScript and the DOM. FlowQuery TYPO3.Eel Friday, March 15, 13
  18. Refe- rence q(node).property("title") Goal Provide helper functions for working with

    TYPO3CR nodes in Eel like jQuery for JavaScript and the DOM. influenced by jQuery FlowQuery TYPO3.Eel Friday, March 15, 13
  19. Refe- rence q(node).property("title") Goal Provide helper functions for working with

    TYPO3CR nodes in Eel like jQuery for JavaScript and the DOM. influenced by jQuery work with tree structures FlowQuery TYPO3.Eel Friday, March 15, 13
  20. Refe- rence q(node).property("title") Goal Provide helper functions for working with

    TYPO3CR nodes in Eel like jQuery for JavaScript and the DOM. influenced by jQuery work with tree structures extensible operations FlowQuery TYPO3.Eel Friday, March 15, 13
  21. Flow Query Examples node: context expression result home Page title

    Home cms Page title CMS desc Conte... neos Page title Neos desc Flow... Friday, March 15, 13
  22. Flow Query Examples node: context expression result q(node).property("title“) home Page

    title Home cms Page title CMS desc Conte... neos Page title Neos desc Flow... Friday, March 15, 13
  23. Flow Query Examples node: context expression result "Home" q(node).property("title“) home

    Page title Home cms Page title CMS desc Conte... neos Page title Neos desc Flow... Friday, March 15, 13
  24. Flow Query Examples node: context expression result "Home" q(node).property("title“) home

    Page title Home cms Page title CMS desc Conte... q(node) .children("[title=CMS]") .property("description") neos Page title Neos desc Flow... Friday, March 15, 13
  25. Flow Query Examples node: context expression result "Home" q(node).property("title“) home

    Page title Home cms Page title CMS desc Conte... "Content ..." q(node) .children("[title=CMS]") .property("description") neos Page title Neos desc Flow... Friday, March 15, 13
  26. Flow Query Examples node: context expression result "Home" q(node).property("title“) home

    Page title Home cms Page title CMS desc Conte... "Content ..." q(node) .children("[title=CMS]") .property("description") neos Page title Neos desc Flow... q(node) .add(q(node).children()) Friday, March 15, 13
  27. Flow Query Examples node: context expression result "Home" q(node).property("title“) home

    Page title Home cms Page title CMS desc Conte... "Content ..." q(node) .children("[title=CMS]") .property("description") neos Page title Neos desc Flow... [home, cms, neos] q(node) .add(q(node).children()) Friday, March 15, 13
  28. TYPO3.Neos.ContentTypes/Resources/Private/TypoScript/Root.ts2 Brug af FlowQuery # Basic implementation of a flexible

    MultiColumn element, not exposed directly but inherited by all specific MultiColumn content elements prototype(TYPO3.Neos.ContentTypes:MultiColumn) < prototype(TYPO3.TypoScript:Template) prototype(TYPO3.Neos.ContentTypes:MultiColumn) { templatePath = 'resource://TYPO3.Neos.ContentTypes/Private/Templates/TypoScriptObjects/ MultiColumn.html' layout = ${q(node).property('layout')} columns = TYPO3.TypoScript:Collection columns { collection = ${q(node).children('[instanceof TYPO3.Neos.ContentTypes:Section]')} itemRenderer = TYPO3.Neos.ContentTypes:MultiColumnItem } } Friday, March 15, 13
  29. Settings.yaml Creating Custom Content Types TYPO3: TYPO3CR: contentTypes: 'Acme.Demo:YouTube': superTypes:

    ['...ContentTypes:Headline'] icon: 'Images/Icons/youtube_icon.png' label: 'YouTube' properties: video: type: string label: 'YouTube embed id' group: 'video' groups: video: label: 'Video' Friday, March 15, 13
  30. Settings.yaml Creating Custom Content Types TYPO3: TYPO3CR: contentTypes: 'Acme.Demo:YouTube': superTypes:

    ['...ContentTypes:Headline'] icon: 'Images/Icons/youtube_icon.png' label: 'YouTube' properties: video: type: string label: 'YouTube embed id' group: 'video' groups: video: label: 'Video' TypoScript prototype(Acme.Demo:YouTube) < prototype(TYPO3.Phoenix.ContentTypes:Headline) { templatePath = '.../YouTube.html' video = ${q(node).property('video')} } Friday, March 15, 13
  31. Settings.yaml Creating Custom Content Types TYPO3: TYPO3CR: contentTypes: 'Acme.Demo:YouTube': superTypes:

    ['...ContentTypes:Headline'] icon: 'Images/Icons/youtube_icon.png' label: 'YouTube' properties: video: type: string label: 'YouTube embed id' group: 'video' groups: video: label: 'Video' TypoScript prototype(Acme.Demo:YouTube) < prototype(TYPO3.Phoenix.ContentTypes:Headline) { templatePath = '.../YouTube.html' video = ${q(node).property('video')} } YouTube.html YouTube.html {namespace t=TYPO3\TYPO3\ViewHelpers} <t:contentElement node="{context}"> <t:aloha.editable property="title" tag="header"> {title -> f:format.raw()} </t:aloha.editable> <figure class="video"> <iframe src="http://www.youtube.com/embed/ {video}?wmode=transparent" frameborder="0" allowfullscreen></iframe> </figure> </t:contentElement> Friday, March 15, 13
  32. Settings.yaml Creating Custom Content Types TYPO3: TYPO3CR: contentTypes: 'Acme.Demo:YouTube': superTypes:

    ['...ContentTypes:Headline'] icon: 'Images/Icons/youtube_icon.png' label: 'YouTube' properties: video: type: string label: 'YouTube embed id' group: 'video' groups: video: label: 'Video' TypoScript prototype(Acme.Demo:YouTube) < prototype(TYPO3.Phoenix.ContentTypes:Headline) { templatePath = '.../YouTube.html' video = ${q(node).property('video')} } YouTube.html YouTube.html {namespace t=TYPO3\TYPO3\ViewHelpers} <t:contentElement node="{context}"> <t:aloha.editable property="title" tag="header"> {title -> f:format.raw()} </t:aloha.editable> <figure class="video"> <iframe src="http://www.youtube.com/embed/ {video}?wmode=transparent" frameborder="0" allowfullscreen></iframe> </figure> </t:contentElement> there will be an editor Friday, March 15, 13
  33. TYPO3.TYPO3/Configuration/Settings.yaml Simple Backend Modules TYPO3: TYPO3: modules: administration: submodules: packages:

    label: 'Package Management' controller: '\TYPO3\TYPO3\Controller\Module\Administration\PackagesController' description: "The Package Management ..." icon: 'resource://TYPO3.TYPO3/Public/Images/Icons/Orange/box_icon-24.png' Friday, March 15, 13
  34. TYPO3.TYPO3/Configuration/Settings.yaml Simple Backend Modules TYPO3: TYPO3: modules: administration: submodules: packages:

    label: 'Package Management' controller: '\TYPO3\TYPO3\Controller\Module\Administration\PackagesController' description: "The Package Management ..." icon: 'resource://TYPO3.TYPO3/Public/Images/Icons/Orange/box_icon-24.png' Controllers and Templates Simply Unmodified Friday, March 15, 13
  35. Goal Provide a generic and extensible admin interface for all

    kinds of data. Expose Admin Interface TYPO3.Expose Refe- rence Friday, March 15, 13
  36. Goal Provide a generic and extensible admin interface for all

    kinds of data. Expose Admin Interface TYPO3.Expose Refe- rence Listing and Editing Friday, March 15, 13
  37. Goal Provide a generic and extensible admin interface for all

    kinds of data. Expose Admin Interface TYPO3.Expose Refe- rence Listing and Editing support objects and nodes Friday, March 15, 13
  38. Goal Provide a generic and extensible admin interface for all

    kinds of data. Expose Admin Interface TYPO3.Expose Refe- rence Listing and Editing support objects and nodes extensible through TypoScript Friday, March 15, 13
  39. Roadmap Media browser Link browser User Interface Design TYPO3 CMS

    til Neos migrering Oversat User Interface Domain Model Management Module Bruger roller og håndtering Multi-sprog håndtering Søgning 2013 Friday, March 15, 13