How can I insert the current page title automatically into a TYPO3 template?

后端 未结 8 968
终归单人心
终归单人心 2021-02-05 17:08

actually the title is the whole question.

I just want to modify the template so that the current page title is automatically shown (i\'m working with html templates so I

8条回答
  •  自闭症患者
    2021-02-05 17:47

    lib.pagetitle = RECORDS
    lib.pagetitle {
        source.data = page:uid
        tables = pages
        conf.pages = TEXT
        conf.pages.field = nav_title
    }
    

    To get current page title:

    lib.pagetitle = TEXT
    lib.pagetitle.field=title
    

    For meta data :

    Its very important to place meta after header tag when we are gone through mobile compatible website

    In order to prevent quirks mode in IE9 I need to add this lines at the very top of every HTML page:

    You can write the whole header by yourself, by adding disableAllHeaderCode = 1 to your typoscript or you can hack it by adding your meta tag directly to the head tag:

     page.headTag = 
    

    Place this at your typoscript

     meta.X-UA-Compatible = IE=edge,chrome=1
    

    httpEquivalent: (Since TYPO3 4.7) If set to 1, the http-equiv attribute is used in the meta tag instead of the “name” attribute. Default: 0.

    For more information about TYPO3 stuff you may visit my blog

    https://jainishsenjaliya.wordpress.com/2013/10/10/put-meta-tag-on-top-of-header-section-in-typo3/

提交回复
热议问题