Zum Inhalt springen

Beispielcode aus offiziellem Tutorial funktioniert nicht

Erstellt am 15. Oktober 2016 · 2 Antworten · letzte Antwort am 20. Oktober 2016

Tags: TYPO3 7, Frage

fwerre ·

Hallo,
ich beschäftige mich neu mit Typoscript. Habe das offizielle Tutorial "Typoscript in 45 Minutes" gemacht.
Leider bekomme ich bei dem Beispielcode auf dieser Seite nichts mehr angezeigt (weisse Seite ohne Inhalt):
https://docs.typo3.org/typo3cms/TyposcriptIn45MinutesTutorial/ReadingContentRecords/ContentElements/Index.html

Ich habe den Anfang aus dem Beispiel der vorigen Seite genommen und dann den von dieser Seite dazugebaut:

page = PAGE
page.typeNum = 0
# The CONTENT object executes a database query and loads the content.
page.10 = CONTENT
page.10.table = tt_content
page.10.select {
     # "sorting" is a column from the tt_content table and
     # keeps track of the sorting order, which was specified in
     # the backend.
     orderBy = sorting
     # Only select content from column "0" (the column called
     # "normal").
     where = colPos = 0
}
page.10.renderObj = CASE
page.10.renderObj {
        # The field CType will be used to differentiate.
        key.field = CType
        # The content type "headline" is stored internally as "header".
        header = TEXT
        header.stdWrap.field = header
        header.stdWrap.wrap = <h1>|</h1>
        # Text is used for the text content element.
        text = COA
        text {
                10 = TEXT
                # The field tt_content.header normally holds the headline.
                10.stdWrap.field = header
                10.stdWrap.wrap = <h1>|</h1>
                20 = TEXT
                # The field tt_content.bodytext holds the content text.
                20.stdWrap.field = bodytext
                20.stdWrap.wrap = <p>|</p>
        }
        # ... other definitions follow here ...
}

Wieso funktioniert das nicht?

Danke!
Grüße, fwerre

Julian.​Hofmann ·

Hallo fwerre.

Ansich funktioniert das Beispiel. Hab es eben in TYPO3 7.6.11 ausprobiert.

Hat Deine Seite denn in der Spalte "Normal" (colPos=0) Inhalt, den TYPO3 anzeigen könnte?

Welchen "Anfang aus dem Beispiel der vorigen Seite" hast Du noch im TypoScript? Poste doch mal den ganzen Inhalt des TypoScript-Setups. Vielleicht steckt da ja ein Fehler drin (z.B. falsche Klammerung).

Viele Grüße
Julian