---
title: "Tabellenlayout mit \"header_layout\" steuern."
url: "https://www.typo3.net/d/19632-tabellenlayout-mit-header-layout-steuern"
source: "typo3.net"
tags: ["Allgemein","Frage"]
created: "2005-01-03"
last_reply: "2005-01-03"
replies: 1
solved: false
page: 1
pages: 1
lang: "de"
---

# Tabellenlayout mit "header_layout" steuern.

Allgemein · 1 Antwort · gestartet 2005-01-03

## Eröffnungsbeitrag

**winiman** · 2005-01-03 · [Beitrag #1](https://www.typo3.net/d/19632-tabellenlayout-mit-header-layout-steuern/1)

Hallo zusammen!

Ich habe da ein kleines Problem:

Ich möchte anhand des "header_layout" entsprechend Seiteninhalt ausgeben. Das soll so laufen, dass je nach eingestelltem Layout der eine oder der andere "wrap" dazu benutzt wird. Der jeweilige "wrap" erstell ein bestimmtes Tabellenlayout um den Content herum.
Für das "Normal"-Layout sollen keinerlei Bedingungen gelten.

Für die Überschrift wird das entsprechende Tabellenlayout geöffnet:

lib.stdheader >
lib.stdheader = CASE
lib.stdheader {
  key.field = header_layout

1 = TEXT
  1.field = header
  1.wrap =  <table width="249" border="0" cellpadding="0" cellspacing="0"><tr><td width="28" height="30" bgcolor="#FFAA55"></td><td width="9" height="30" bgcolor="#FFEBD8"></td><td width="212" height="30" bgcolor="#FFEBD8" class="headline"><span class="headline"> | </span></td></tr><tr><td colspan="3">&nbsp;</td></tr>

2 = TEXT
  2.field = header
  2.wrap = <table width="253" border="8" cellpadding="0" cellspacing="0" bordercolor="#E6E4E4"><tr><td><table width="100%" border="1" cellpadding="3" cellspacing="0" bordercolor="#E6E4E4"><tr> <td><img src="fileadmin/template/main/img/punkt_orange.gif" width="7" height="7">&nbsp;<span class="headline"> | </span></td></tr>

default < .0
}

Und für den Bodytext wieder geschlossen:

tmp_tt_content_text < tt_content.text
tt_content.text >
tt_content.text = COA
tt_content.text.10 < lib.stdheader
tt_content.text.20 = CASE
tt_content.text.20 {
key.field = header_layout

1 = TEXT
    1 {
        field = bodytext
        fieldRequired = bodytext
        wrap = <tr><td colspan="3"><span class="content"> | </span><br></td></tr></table>
        parseFunc < tmp_tt_content_text.10.parseFunc
        editIcons < tmp_tt_content_text.10.editIcons
    }

2 = TEXT
    2 {
        field = bodytext
        fieldRequired = bodytext
        wrap= <tr><td><p class="content"> | </p></td></tr></table></td></tr><tr><td height="30" bgcolor="#E6E4E4"><div align="right"><img src="fileadmin/template/main/img/pfeil_rechts.gif" width="11" height="8" border="0"></a></div></td></tr></table>
        parseFunc < tmp_tt_content_text.10.parseFunc
        editIcons < tmp_tt_content_text.10.editIcons
}
}

Soweit so gut, das klappt bei normalem Text schon ganz gut, jetzt möchte ich das allerdings auch bei Content "Bild" oder "Text mit Bild" machen.
Ich dachte, das ginge analog zum "Text" so:

tmp_tt_content_image < tt_content.image
tt_content.image >
tt_content.image = COA
tt_content.image.10 < lib.stdheader
tt_content.image.20 = CASE
tt_content.image.20 {
key.field = header_layout

    1 = IMAGE
    1 {
        field = image
        fieldRequired = image
        wrap = <tr><td colspan="3"><span class="content"> | </span><br></td></tr></table>
        parseFunc < tmp_tt_content_image.10.parseFunc
        editIcons < tmp_tt_content_image.10.editIcons
    }

2 = IMAGE
    2 {
        field = image
        fieldRequired = image
        wrap= <tr><td><p class="content"> | </p></td></tr></table></td></tr><tr><td height="30" bgcolor="#E6E4E4"><div align="right"><img src="fileadmin/template/main/img/pfeil_rechts.gif" width="11" height="8" border="0"></a></div></td></tr></table>
        parseFunc < tmp_tt_content_image.10.parseFunc
        editIcons < tmp_tt_content_image.10.editIcons
}
}

Wenn ich das so mache, sehe ich auf meiner Seite aber überhaupt keine Bilder mehr (egal welches Layout, auch nicht die vom "Normal"-Layout).

Frage: Was mache ich hier verkehrt? Wie müsste ich abfragen und wie müsste die Abfrage lauten, wenn ich z.B. "Text mit Bild" abfragen möchte.

Würde mich über eure Antworten sehr freuen.

Grüsse,

Thorsten

## Antworten

### [#2](https://www.typo3.net/d/19632-tabellenlayout-mit-header-layout-steuern/2) · winiman · 2005-01-03

Hallo zusammen!

Ich hatte heute morgen schonmal gepostet:

Ich bin aber ein kleines Stück weiter mit meinem Problem, aber noch nicht bei der Lösung.

Ich möchte wie bereits erwähnt mittels "header_layout" die Ausgaben verschieden formatieren. Dazu werden entsprechende HTML-Tabellen als Wraps genutzt.
Bei Texten ist das grundsätzlich kein Problem, allerdings hapert es ein wenig am Content "IMAGE" und "IMGTEXT".

Ich habe zumindest schonmal eine Ausgabe erhalten, allerdings schaffe ich es nicht, den Content "IMAGE" und "IMGTEXT" entsprechend ins Tabellenlayout für Layout 1 und 2 einzuschliessen, da ich nicht weiss wo ich da ansetzen soll.

Der textliche Contentinhalt wird wie folgt erstellt:

-------------------------------------------------------------------------------------------------------------------
lib.stdheader >
lib.stdheader = CASE
lib.stdheader {
  key.field = header_layout

1 = TEXT
  1.field = header
  1.wrap =  <table width="249" border="0" cellpadding="0" cellspacing="0"><tr><td width="28" height="30" bgcolor="#FFAA55"></td><td width="9" height="30" bgcolor="#FFEBD8"></td><td width="212" height="30" bgcolor="#FFEBD8" class="headline"><span class="headline"> | </span></td></tr><tr><td colspan="3">&nbsp;</td></tr>

2 = TEXT
  2.field = header
  2.wrap = <table width="253" border="8" cellpadding="0" cellspacing="0" bordercolor="#E6E4E4"><tr><td><table width="100%" border="1" cellpadding="3" cellspacing="0" bordercolor="#E6E4E4"><tr> <td><img src="fileadmin/template/main/img/punkt_orange.gif" width="7" height="7">&nbsp;<span class="headline"> | </span></td></tr>

default < .0
}

tmp_tt_content_text < tt_content.text
tt_content.text >
tt_content.text = COA
tt_content.text.10 < lib.stdheader
tt_content.text.20 = CASE
tt_content.text.20 {
key.field = header_layout

1 = TEXT
    1 {
        field = bodytext
        fieldRequired = bodytext
        wrap = <tr><td colspan="3"><span class="content"> | </span><br></td></tr></table>
        parseFunc < tmp_tt_content_text.10.parseFunc
        editIcons < tmp_tt_content_text.10.editIcons
    }
    2 = TEXT
    2 {
        field = bodytext
        fieldRequired = bodytext
        wrap= <tr><td> | </td></tr><tr><td height="30" bgcolor="#E6E4E4"><div align="right"><img src="fileadmin/template/main/img/pfeil_rechts.gif" width="11" height="8" border="0"></div></td></tr></table>
        parseFunc < tmp_tt_content_text.10.parseFunc
        editIcons < tmp_tt_content_text.10.editIcons
}
}
-------------------------------------------------------------------------------------------------------------------

Um IMAGE und IMGTEXT darzustellen verwende ich gleich darunter folgendes:

-------------------------------------------------------------------------------------------------------------------
# *****************
# CType: image
# *****************
# (also used for rendering 'textpic' type):
tt_content.image = COA
tt_content.image.10 = < lib.stdheader
tt_content.image.20 = IMGTEXT
tt_content.image.20 {
 imgList.field = image
 textPos.field = imageorient
 imgPath = uploads/pics/
 imgObjNum = 1
 1 {
  file.import.current = 1
  file.width.field = imagewidth
  params = align="top"
  imageLinkWrap = 1
  imageLinkWrap {
   bodyTag = <body bgcolor="#FFFFFF" style="margin: 0px;">
   wrap = <a href="javascript:close();"> | </a>
   width = {$styles.content.imgtext.linkWrap.width}
   height = {$styles.content.imgtext.linkWrap.height}
   effects = {$styles.content.imgtext.linkWrap.effects}

JSwindow = 1
   JSwindow.newWindow = {$styles.content.imgtext.linkWrap.newWindow}
   JSwindow.expand = 0,0

enable.field = image_zoom
   enable.ifEmpty.field = image_link

typolink.parameter.field = image_link
   typolink.parameter.listNum.stdWrap.data = register : IMAGE_NUM
   typolink.target = {$styles.content.links.target}
   typolink.extTarget = {$styles.content.links.extTarget}
  }
 }

maxW = {$styles.content.imgtext.maxW}
 maxW.override.data = register:maxImageWidth
 maxWInText = {$styles.content.imgtext.maxWInText}
 maxWInText.override.data = register:maxImageWidthInText

equalH.field = imageheight
 spaceBelowAbove = 6

image_compression.field = image_compression
 image_effects.field = image_effects

noRows.field = image_noRows

cols.field = imagecols
 border.field = imageborder
 caption {
  1 = TEXT
  1 {
   if.isFalse = {$styles.content.imgtext.captionSplit}
   field = imagecaption
   required = 1
   parseFunc = < lib.parseFunc
   br = 1
   fontTag = <p class="content">|</p>
   wrapAlign.field = imagecaption_position
  }
 }
 captionSplit = {$styles.content.imgtext.captionSplit}
 captionSplit.cObject = TEXT
 captionSplit.cObject.field = imagecaption
 captionSplit.stdWrap < .caption.1
 captionSplit.stdWrap {
  field >
  if >
 }

borderCol = {$styles.content.imgtext.borderColor}
 borderThick = {$styles.content.imgtext.borderThick}
 colSpace = {$styles.content.imgtext.colSpace}
 rowSpace = {$styles.content.imgtext.rowSpace}
 textMargin = {$styles.content.imgtext.textMargin}

editIcons = tt_content : image [imageorient|imagewidth|imageheight],
[imagecols|image_noRows|imageborder],[image_link|image_zoom],[image_compress
ion|image_effects|image_frames],imagecaption[imagecaption_position]
 editIcons.iconTitle.data =
LLL:EXT:css_styled_content/pi1/locallang.php:eIcon.images

caption.editIcons = tt_content : imagecaption[imagecaption_position]
 caption.editIcons.beforeLastTag=1
 caption.editIcons.iconTitle.data =
LLL:EXT:css_styled_content/pi1/locallang.php:eIcon.caption

stdWrap.prefixComment = 2 | Image block:
}

-------------------------------------------------------------------------------------------------------------------

Nun mein Problem: Ich schaffe es wie gesagt nicht, um diesen Content die Tabelle
zu schliessen. Wer weiss Rat?

Würde mich über Postings sehr freuen!

Es grüsst Thorsten aus Göttingen, ein Typo3-Newbie

---

Quelle: „Tabellenlayout mit "header_layout" steuern.“, typo3.net, https://www.typo3.net/d/19632-tabellenlayout-mit-header-layout-steuern
Beiträge von Mitgliedern des Forums. Bitte mit Link auf die Diskussion zitieren.
