SlideShare a Scribd company logo
1 of 21
Download to read offline
Robert Lemke
          TypoScript 2.0
          T3CON10 Frankfurt




Samstag, 2. Oktober 2010
Robert Lemke
                chief architect of TYPO3 Phoenix and FLOW3

                co-founder of the TYPO3 Association

                34 years old

                lives in Lübeck, Germany

                1 wife, 1 daughter, 1 espresso machine

                likes drumming




Samstag, 2. Oktober 2010
Design Goals
                           Clear Purpose

                           Consistency

                           Object-Oriented

                           Extensible




               TypoScript 2.0                T3CON10 Frankfurt
Samstag, 2. Oktober 2010
TypoScript 2.0 is an object-oriented
                                  view definition language

                           (don't use it for plain configuration anymore)




               TypoScript 2.0                                     T3CON10 Frankfurt
Samstag, 2. Oktober 2010
TypoScript = { TypoScriptLine LineBreak };


 New
                                TypoScriptLine = ( Comment | ConfinementBlock | Declaration | ParseCondition | Ob

                                ConfinementBlock = ObjectPath "{" LineBreak { TypoScriptLine } "}" ;

                                Declaration = ( IncludeDeclaration | NamespaceDeclaration );


 Syntax                         Comment = ( SingleLineComment | BlockComment );
                                ObjectDefinition = ObjectPath ValueOperation;

                                IncludeDeclaration = "include" ":" "source" "=" DoubleQuote Resource DoubleQuote
                                NamespaceDeclaration = "namespace" ":" NamespaceIdentifier "=" ObjectName;

                                SingleLineComment = ( "#" | "//" ) { UnicodeCharacter };
                                BlockComment = "/*" { UnicodeCharacter | LineBreak } "*/";

                                ObjectPath = [ "." ] ObjectIdentifier { "." ObjectIdentifier } ( [ "." VariableName ] | [ "."
                                VariableName = "$" Identifier;

                                ValueOperation = ( ValueAssignment | ValueCopy | ValueReference | ValueUnset | ValueP
                                ValueAssignment = "=" ( Literal | ObjectType | Constant );
                                ValueCopy = "<" ObjectPath;
                                ValueReference = "=<" ObjectPath;
                                ValueUnset = ">";
               TypoScript 2.0                                                         T3CON10 Frankfurt
                                ValueProcessing = "<<" ArrayOffset "." [ ObjectName "->" ] MethodName "(" { Metho
Samstag, 2. Oktober 2010
CASE

                           myPage = Page
                           myPage.title = "Foo"

                           foo.color = RED




               TypoScript 2.0                     T3CON10 Frankfurt
Samstag, 2. Oktober 2010
Literals

                           foo = 'Single quoted'
                           bar = "Double quoted"
                           baz = "I use " and ' within a quoted literal"




               TypoScript 2.0                                               T3CON10 Frankfurt
Samstag, 2. Oktober 2010
Comments
                           foo = Bar // <- here's a comment
                           # baz = Quux (not active)
                           /*
                            page = Page
                           */



               TypoScript 2.0                                 T3CON10 Frankfurt
Samstag, 2. Oktober 2010
Type Safe


                           thePurpose = 42
                           theSalary = 41.66
                           theTruth = FALSE




               TypoScript 2.0                  T3CON10 Frankfurt
Samstag, 2. Oktober 2010
Assignments

                           page = Page
                           page < coolPage
                           page.title =< thirdPage.title
                           page >




               TypoScript 2.0                              T3CON10 Frankfurt
Samstag, 2. Oktober 2010
Namespaces


                           namespace: default = F3PlusPlusTypoScript


                           page = Page




               TypoScript 2.0                                             T3CON10 Frankfurt
Samstag, 2. Oktober 2010
Variables


                           myText = Text
                           myText.$name = "audience"
                           myText.headline = "Hello $name!"




               TypoScript 2.0                                 T3CON10 Frankfurt
Samstag, 2. Oktober 2010
TypoScript 2.0   T3CON10 Frankfurt
Samstag, 2. Oktober 2010
Nodes
                           Node Tree instead of Page Tree
                           Content Types




               TypoScript 2.0                               T3CON10 Frankfurt
Samstag, 2. Oktober 2010
DEMO

               TypoScript 2.0          T3CON10 Frankfurt
Samstag, 2. Oktober 2010
And stdWrap?


               TypoScript 2.0                  T3CON10 Frankfurt
Samstag, 2. Oktober 2010
Processors

                           myText = Text
                           myText.text = "Hey you guys really rock and what I always wanted to say
                           myText.text << 2.crop(maximumCharacters = 20)
                           myText.text << 1.wrap('<em>', '</em>')




               TypoScript 2.0                                              T3CON10 Frankfurt
Samstag, 2. Oktober 2010
Processors




               TypoScript 2.0   T3CON10 Frankfurt
Samstag, 2. Oktober 2010
Customising TypoScript
                           Create new Content Types
                           Tweak or override Fluid Templates
                           Create new TypoScript Object Types




               TypoScript 2.0                                   T3CON10 Frankfurt
Samstag, 2. Oktober 2010
Questions

                Email:          robert@typo3.org
                Blog:           http://robertlemke.de/blog
                Twitter:        @t3rob

                Slides:         http://slideshare.net/rlmp




               TypoScript 2.0                                T3CON10 Frankfurt
Samstag, 2. Oktober 2010
Samstag, 2. Oktober 2010

More Related Content

More from Robert Lemke

Neos Content Repository – Git for content
Neos Content Repository – Git for contentNeos Content Repository – Git for content
Neos Content Repository – Git for contentRobert Lemke
 
A General Purpose Docker Image for PHP
A General Purpose Docker Image for PHPA General Purpose Docker Image for PHP
A General Purpose Docker Image for PHPRobert Lemke
 
Scaleable PHP Applications in Kubernetes
Scaleable PHP Applications in KubernetesScaleable PHP Applications in Kubernetes
Scaleable PHP Applications in KubernetesRobert Lemke
 
Flownative Beach - Neos Meetup Hamburg 2022
Flownative Beach - Neos Meetup Hamburg 2022Flownative Beach - Neos Meetup Hamburg 2022
Flownative Beach - Neos Meetup Hamburg 2022Robert Lemke
 
GitOps with Flux - IPC Munich 2022
GitOps with Flux - IPC Munich 2022GitOps with Flux - IPC Munich 2022
GitOps with Flux - IPC Munich 2022Robert Lemke
 
OpenID Connect with Neos and Flow
OpenID Connect with Neos and FlowOpenID Connect with Neos and Flow
OpenID Connect with Neos and FlowRobert Lemke
 
Neos Conference 2019 Keynote
Neos Conference 2019 KeynoteNeos Conference 2019 Keynote
Neos Conference 2019 KeynoteRobert Lemke
 
A practical introduction to Kubernetes (IPC 2018)
A practical introduction to Kubernetes (IPC 2018)A practical introduction to Kubernetes (IPC 2018)
A practical introduction to Kubernetes (IPC 2018)Robert Lemke
 
Neos Conference 2018 Welcome Keynote
Neos Conference 2018 Welcome KeynoteNeos Conference 2018 Welcome Keynote
Neos Conference 2018 Welcome KeynoteRobert Lemke
 
A practical introduction to Event Sourcing and CQRS
A practical introduction to Event Sourcing and CQRSA practical introduction to Event Sourcing and CQRS
A practical introduction to Event Sourcing and CQRSRobert Lemke
 
Neos Conference 2017 Welcome Keynote
Neos Conference 2017 Welcome KeynoteNeos Conference 2017 Welcome Keynote
Neos Conference 2017 Welcome KeynoteRobert Lemke
 
IPC16: A Practical Introduction to Kubernetes
IPC16: A Practical Introduction to Kubernetes IPC16: A Practical Introduction to Kubernetes
IPC16: A Practical Introduction to Kubernetes Robert Lemke
 
IPC 2016: Content Strategy for Developers
IPC 2016: Content Strategy for DevelopersIPC 2016: Content Strategy for Developers
IPC 2016: Content Strategy for DevelopersRobert Lemke
 
Docker in Production - IPC 2016
Docker in Production - IPC 2016Docker in Production - IPC 2016
Docker in Production - IPC 2016Robert Lemke
 
Turning Neos inside out / React.js HH
Turning Neos inside out / React.js HHTurning Neos inside out / React.js HH
Turning Neos inside out / React.js HHRobert Lemke
 
Docker in Production - IPC 15 München
Docker in Production - IPC 15 MünchenDocker in Production - IPC 15 München
Docker in Production - IPC 15 MünchenRobert Lemke
 
Two Stack CMS - code.talks 2015
Two Stack CMS - code.talks 2015Two Stack CMS - code.talks 2015
Two Stack CMS - code.talks 2015Robert Lemke
 
Two Stack CMS – code.talks Hamburg 2015
Two Stack CMS – code.talks Hamburg 2015Two Stack CMS – code.talks Hamburg 2015
Two Stack CMS – code.talks Hamburg 2015Robert Lemke
 
Neos: Assets in the Cloud - Inspiring Conference 2015
Neos: Assets in the Cloud - Inspiring Conference 2015Neos: Assets in the Cloud - Inspiring Conference 2015
Neos: Assets in the Cloud - Inspiring Conference 2015Robert Lemke
 
Neos – Past, Present, Future – Keynote Inspiring Conference 2015
Neos – Past, Present, Future – Keynote Inspiring Conference 2015Neos – Past, Present, Future – Keynote Inspiring Conference 2015
Neos – Past, Present, Future – Keynote Inspiring Conference 2015Robert Lemke
 

More from Robert Lemke (20)

Neos Content Repository – Git for content
Neos Content Repository – Git for contentNeos Content Repository – Git for content
Neos Content Repository – Git for content
 
A General Purpose Docker Image for PHP
A General Purpose Docker Image for PHPA General Purpose Docker Image for PHP
A General Purpose Docker Image for PHP
 
Scaleable PHP Applications in Kubernetes
Scaleable PHP Applications in KubernetesScaleable PHP Applications in Kubernetes
Scaleable PHP Applications in Kubernetes
 
Flownative Beach - Neos Meetup Hamburg 2022
Flownative Beach - Neos Meetup Hamburg 2022Flownative Beach - Neos Meetup Hamburg 2022
Flownative Beach - Neos Meetup Hamburg 2022
 
GitOps with Flux - IPC Munich 2022
GitOps with Flux - IPC Munich 2022GitOps with Flux - IPC Munich 2022
GitOps with Flux - IPC Munich 2022
 
OpenID Connect with Neos and Flow
OpenID Connect with Neos and FlowOpenID Connect with Neos and Flow
OpenID Connect with Neos and Flow
 
Neos Conference 2019 Keynote
Neos Conference 2019 KeynoteNeos Conference 2019 Keynote
Neos Conference 2019 Keynote
 
A practical introduction to Kubernetes (IPC 2018)
A practical introduction to Kubernetes (IPC 2018)A practical introduction to Kubernetes (IPC 2018)
A practical introduction to Kubernetes (IPC 2018)
 
Neos Conference 2018 Welcome Keynote
Neos Conference 2018 Welcome KeynoteNeos Conference 2018 Welcome Keynote
Neos Conference 2018 Welcome Keynote
 
A practical introduction to Event Sourcing and CQRS
A practical introduction to Event Sourcing and CQRSA practical introduction to Event Sourcing and CQRS
A practical introduction to Event Sourcing and CQRS
 
Neos Conference 2017 Welcome Keynote
Neos Conference 2017 Welcome KeynoteNeos Conference 2017 Welcome Keynote
Neos Conference 2017 Welcome Keynote
 
IPC16: A Practical Introduction to Kubernetes
IPC16: A Practical Introduction to Kubernetes IPC16: A Practical Introduction to Kubernetes
IPC16: A Practical Introduction to Kubernetes
 
IPC 2016: Content Strategy for Developers
IPC 2016: Content Strategy for DevelopersIPC 2016: Content Strategy for Developers
IPC 2016: Content Strategy for Developers
 
Docker in Production - IPC 2016
Docker in Production - IPC 2016Docker in Production - IPC 2016
Docker in Production - IPC 2016
 
Turning Neos inside out / React.js HH
Turning Neos inside out / React.js HHTurning Neos inside out / React.js HH
Turning Neos inside out / React.js HH
 
Docker in Production - IPC 15 München
Docker in Production - IPC 15 MünchenDocker in Production - IPC 15 München
Docker in Production - IPC 15 München
 
Two Stack CMS - code.talks 2015
Two Stack CMS - code.talks 2015Two Stack CMS - code.talks 2015
Two Stack CMS - code.talks 2015
 
Two Stack CMS – code.talks Hamburg 2015
Two Stack CMS – code.talks Hamburg 2015Two Stack CMS – code.talks Hamburg 2015
Two Stack CMS – code.talks Hamburg 2015
 
Neos: Assets in the Cloud - Inspiring Conference 2015
Neos: Assets in the Cloud - Inspiring Conference 2015Neos: Assets in the Cloud - Inspiring Conference 2015
Neos: Assets in the Cloud - Inspiring Conference 2015
 
Neos – Past, Present, Future – Keynote Inspiring Conference 2015
Neos – Past, Present, Future – Keynote Inspiring Conference 2015Neos – Past, Present, Future – Keynote Inspiring Conference 2015
Neos – Past, Present, Future – Keynote Inspiring Conference 2015
 

TypoScript 2.0

  • 1. Robert Lemke TypoScript 2.0 T3CON10 Frankfurt Samstag, 2. Oktober 2010
  • 2. Robert Lemke chief architect of TYPO3 Phoenix and FLOW3 co-founder of the TYPO3 Association 34 years old lives in Lübeck, Germany 1 wife, 1 daughter, 1 espresso machine likes drumming Samstag, 2. Oktober 2010
  • 3. Design Goals Clear Purpose Consistency Object-Oriented Extensible TypoScript 2.0 T3CON10 Frankfurt Samstag, 2. Oktober 2010
  • 4. TypoScript 2.0 is an object-oriented view definition language (don't use it for plain configuration anymore) TypoScript 2.0 T3CON10 Frankfurt Samstag, 2. Oktober 2010
  • 5. TypoScript = { TypoScriptLine LineBreak }; New TypoScriptLine = ( Comment | ConfinementBlock | Declaration | ParseCondition | Ob ConfinementBlock = ObjectPath "{" LineBreak { TypoScriptLine } "}" ; Declaration = ( IncludeDeclaration | NamespaceDeclaration ); Syntax Comment = ( SingleLineComment | BlockComment ); ObjectDefinition = ObjectPath ValueOperation; IncludeDeclaration = "include" ":" "source" "=" DoubleQuote Resource DoubleQuote NamespaceDeclaration = "namespace" ":" NamespaceIdentifier "=" ObjectName; SingleLineComment = ( "#" | "//" ) { UnicodeCharacter }; BlockComment = "/*" { UnicodeCharacter | LineBreak } "*/"; ObjectPath = [ "." ] ObjectIdentifier { "." ObjectIdentifier } ( [ "." VariableName ] | [ "." VariableName = "$" Identifier; ValueOperation = ( ValueAssignment | ValueCopy | ValueReference | ValueUnset | ValueP ValueAssignment = "=" ( Literal | ObjectType | Constant ); ValueCopy = "<" ObjectPath; ValueReference = "=<" ObjectPath; ValueUnset = ">"; TypoScript 2.0 T3CON10 Frankfurt ValueProcessing = "<<" ArrayOffset "." [ ObjectName "->" ] MethodName "(" { Metho Samstag, 2. Oktober 2010
  • 6. CASE myPage = Page myPage.title = "Foo" foo.color = RED TypoScript 2.0 T3CON10 Frankfurt Samstag, 2. Oktober 2010
  • 7. Literals foo = 'Single quoted' bar = "Double quoted" baz = "I use " and ' within a quoted literal" TypoScript 2.0 T3CON10 Frankfurt Samstag, 2. Oktober 2010
  • 8. Comments foo = Bar // <- here's a comment # baz = Quux (not active) /* page = Page */ TypoScript 2.0 T3CON10 Frankfurt Samstag, 2. Oktober 2010
  • 9. Type Safe thePurpose = 42 theSalary = 41.66 theTruth = FALSE TypoScript 2.0 T3CON10 Frankfurt Samstag, 2. Oktober 2010
  • 10. Assignments page = Page page < coolPage page.title =< thirdPage.title page > TypoScript 2.0 T3CON10 Frankfurt Samstag, 2. Oktober 2010
  • 11. Namespaces namespace: default = F3PlusPlusTypoScript page = Page TypoScript 2.0 T3CON10 Frankfurt Samstag, 2. Oktober 2010
  • 12. Variables myText = Text myText.$name = "audience" myText.headline = "Hello $name!" TypoScript 2.0 T3CON10 Frankfurt Samstag, 2. Oktober 2010
  • 13. TypoScript 2.0 T3CON10 Frankfurt Samstag, 2. Oktober 2010
  • 14. Nodes Node Tree instead of Page Tree Content Types TypoScript 2.0 T3CON10 Frankfurt Samstag, 2. Oktober 2010
  • 15. DEMO TypoScript 2.0 T3CON10 Frankfurt Samstag, 2. Oktober 2010
  • 16. And stdWrap? TypoScript 2.0 T3CON10 Frankfurt Samstag, 2. Oktober 2010
  • 17. Processors myText = Text myText.text = "Hey you guys really rock and what I always wanted to say myText.text << 2.crop(maximumCharacters = 20) myText.text << 1.wrap('<em>', '</em>') TypoScript 2.0 T3CON10 Frankfurt Samstag, 2. Oktober 2010
  • 18. Processors TypoScript 2.0 T3CON10 Frankfurt Samstag, 2. Oktober 2010
  • 19. Customising TypoScript Create new Content Types Tweak or override Fluid Templates Create new TypoScript Object Types TypoScript 2.0 T3CON10 Frankfurt Samstag, 2. Oktober 2010
  • 20. Questions Email: robert@typo3.org Blog: http://robertlemke.de/blog Twitter: @t3rob Slides: http://slideshare.net/rlmp TypoScript 2.0 T3CON10 Frankfurt Samstag, 2. Oktober 2010