---
title: "Probleme und Lösungen mit Spalten"
url: "https://www.typo3.net/d/25450-probleme-und-loesungen-mit-spalten"
source: "typo3.net"
tags: ["TYPO3","TypoScript","Frage","Templates & Layouts"]
created: "2005-06-02"
last_reply: "2005-06-02"
replies: 0
solved: false
page: 1
pages: 1
lang: "de"
---

# Probleme und Lösungen mit Spalten

TYPO3 › TypoScript · 0 Antworten · gestartet 2005-06-02

## Eröffnungsbeitrag

**ex-kali-bur** · 2005-06-02 · [Beitrag #1](https://www.typo3.net/d/25450-probleme-und-loesungen-mit-spalten/1)

Hallo,
also ich bin mit Hilfe diese und anderer Foren und Anleitungen schon ein ganzes Stück weit gekommen, allerdings stoße ich immer wieder auf neue Probleme.

Ich will die Spalten von Typo3 benutzen:
0 = NORMAL: Normaler Inhalt
1 = LINKS: Kurze Inhaltsblöcke
2 = RECHTS: Kurze Inhaltsblöcke
3 = RAND: Banner
Um das zu realisieren, habe ich die EXT:automaketemplate benutzt.
Da stand ich vor dem 1. Problem, die Spalten sollen alle ein unterschiedliches Layout haben, was ich 'fast' hinbekommen habe (funktioniert nur mit header und bodytext und ist imho unsauber gelöst).

Jetzt habe ich das Problem, dass ich in die Blöcke z.B. tt_poll einfügen möchte. In der Spalte NORMAL funktioniert alles so weit prima, in den Blöcken erhalte ich jedoch keinen Output. Was anscheinend daran liegt, dass ich den header und bodytext manuell wrappe.

Es muss doch eigentlich möglich sein, statt die Blöcke zu wrappen, eine Datei (block.tmpl) zu benutzen und und dort zwei Marker zu füllen (###HEADER### und ###REST_EGAL_WAS_ES_IST###).

Hat jemand eine Idee dazu?

Meine Scripte sehen wie folgt aus (vieles davon ist Copy'n'Paste):

MAIN_TMPL:

```typoscript
# ...
# Allgemeine Einstellungen wie z.B. Sprache, DocType, Logging, Realurl etc.
# ...

# Default PAGE object:
page = PAGE
page.typeNum = 0
page.10 < temp.mainTemplate
page.headerData.10 < temp.headTemplate
```

Includierte +ext Templates in der eingebundenen Reihenfolge:

Auto Parser:

```typoscript
# Template Auto-Parser
#
plugin.tx_automaketemplate_pi1 {
	content = FILE
	content.file = fileadmin/templates_1/main_layout.tmpl
	# Here we define which elements in the HTML that
	# should be wrapped in subpart-comments:
	elements {
		BODY.all = 1
		BODY.all.subpartMarker = DOCUMENT_BODY
		HEAD.all = 1
		HEAD.all.subpartMarker = DOCUMENT_HEADER
		HEAD.rmTagSections = title
		TD.all = 1
	}
	# Prefix all relative paths with this value:
	relPathPrefix = fileadmin/templates_1/
}
```

blockRight:

```typoscript
# blockRight cObject

temp.blockRight = CONTENT
temp.blockRight < styles.content.getRight
temp.blockRight {
	renderObj = COA
	renderObj {
		20 = CASE
		20 {
			key.field = header_layout
			default = TEXT
			default.field = header
			default.wrap (
	<table border="0" cellspacing="0" cellpadding="0">
	<tr>
	<td><img src="images/block_head_green_l.gif" width="8" height="15" alt="" /></td>
	<td>|</td>
	<td><img src="images/block_head_green_r.gif" width="8" height="15" alt="" /></td>
	</tr>
			)
			1 = TEXT
			1.field = header
			1.wrap (
	<table border="0" cellspacing="0" cellpadding="0">
	<tr>
	<td><img src="images/block_head_red_l.gif" width="8" height="15" alt="" /></td>
	<td>|</td>
	<td><img src="images/block_head_red_r.gif" width="8" height="15" alt="" /></td>
	</tr>
			)
		}
		30 = TEXT
		30.field = bodytext
		30.wrap (
	<tr>
	<td colspan="3" style="width: 8px;">
	<table border="0" cellspacing="0" cellpadding="0">
	<tr>
	<td class="blockContent">|</td>
	</tr>
	</table>
	</td>
	</tr>
	</table>
		)
	}
	renderObj.stdWrap.required = 1
}
```

skyScraper (RAND):

```typoscript
# Banner Konfiguration
#
temp.skyScraper < plugin.tx_macinabanners_pi1
temp.skyScraper {
	# show banners with this attribute, options are: top, left, bottom, right
	placement = right
	#mode to show banners, options are: all, random
	mode = random
	# list of page ids where the banners should be taken from ( comma seperated f.E.: 1,5,7)
	pidList = 35
	# levels of recoursion to search for banners
	recursive = 0
	# Limit numeber of Banners
	results_at_a_time = 1
}
```

Main Template:

```typoscript
# Main TEMPLATE cObject for the HEAD
temp.headTemplate = TEMPLATE
temp.headTemplate {
	# Feeding the content from the Auto-parser to the TEMPLATE cObject:
	template =< plugin.tx_automaketemplate_pi1
	# Select only the content between the <head>-tags
	workOnSubpart = DOCUMENT_HEADER
}

# Main TEMPLATE cObject for the BODY
temp.mainTemplate = TEMPLATE
temp.mainTemplate {
	# Feeding the content from the Auto-parser to the TEMPLATE cObject:
	template =< plugin.tx_automaketemplate_pi1

	# Select only the content between the <body>-tags
	workOnSubpart = DOCUMENT_BODY

	# Substitute the ###menuMain### subpart with some example content:
	subparts.menuMain < temp.menuMain

	# Substitute the ###menuSub### subpart with some example content:
	subparts.menuSub < temp.menuSub

	# Substitute the ###contentMain### subpart with some example content:
	subparts.contentMain < styles.content.get

	subparts.columnLeft < temp.blockLeft

	subparts.columnRight < temp.blockRight

	# Substitute the ###skyScraper### subpart with some example content:
	subparts.skyScraper < temp.skyScraper

}
```

---

Quelle: „Probleme und Lösungen mit Spalten“, typo3.net, https://www.typo3.net/d/25450-probleme-und-loesungen-mit-spalten
Beiträge von Mitgliedern des Forums. Bitte mit Link auf die Diskussion zitieren.
