[TYPO3-german] Probleme mit einem TypoScript-Snippet

Björn Hahnefeld bjoern at hahnefeld.de
Fri Feb 24 12:25:43 CET 2012


Hallo zusammen,

ich habe in einer eigenen Extension in der "setup.txt" festgelegt, wie die
Ausgabe der Inhaltselemente erfolgen soll. Dies passt auch soweit für den
CE-Typ, mit dem ich nun Probleme habe, denn der Inhalt wird dargestellt und
lässt sich über die Überschriften aufklappen.

Allerdings wird ein als "textpic" hinterlegter Text unformatiert und ohne
Bilder angezeigt. Offensichtlich stimmt irgendein "wrap" nicht. Doch ich
finde leider den Fehler in meinem Quelltext nicht...

--
# Override part 20 of the setup that has been created by the core
tt_content.announcements_pi3.20 >
# make it a Content Object Array (COA)
tt_content.announcements_pi3.20 = COA
tt_content.announcements_pi3.20 {
  # wrap the whole content with a div container
  wrap = <div class="announcements_archive">|</div>
  # set the rest to be uncached (COA_INT instead of COA)
  10 = COA_INT
  10 {
    # wrap the output into a list
    wrap = <ul class="recordlist">|</ul>
    # get the records for this list
    10 = CONTENT
    10 {
      # set the table
      table = tt_content
      select {
        # set the pages containing the records
        pidInList.field = pages
        # set the recursion level
        recursive = 250
        # set the sorting for the DB query
        orderBy = crdate DESC
      }
      # make the renderObj a COA to be able to add stuff before and after it
      renderObj = COA
      renderObj {
        # use rendering of the default element "Text" AND "Text mit Bild"
for the output
        10 < tt_content.textpic
        # and wrap each record as a list item
        # wrap = <li class="record">|</li>
        
        stdWrap.required = 1
        stdWrap.wrap = <li class="record">|</li>
        10 = TEXT
	10 {
	  field = header
	  dataWrap = <div class="csc-header"
onclick="document.getElementById('content_{field:uid}').style.display='block
';" style="cursor: pointer;"><h2>|</h2></div>
          required = 1
	}
	20 = TEXT
	20 {
	  field = bodytext
	  dataWrap = <div class="csc-textpic-text" id="content_{field:uid}"
style="display: none; padding-top: 10px;">|</div>
	  required = 1
	}
      }
    }
  }
}
--

Wer kann mir dabei helfen und weiß, woran es liegt?

Viele Grüße

Björn



More information about the TYPO3-german mailing list