---
title: "maxWInText vs sourceCollection"
url: "https://www.typo3.net/d/120161-maxwintext-vs-sourcecollection"
source: "typo3.net"
tags: ["TYPO3","TypoScript","Frage","TYPO3 6.x"]
created: "2015-05-04"
last_reply: "2015-05-28"
replies: 1
solved: false
page: 1
pages: 1
lang: "de"
---

# maxWInText vs sourceCollection

TYPO3 › TypoScript · 1 Antwort · gestartet 2015-05-04

## Eröffnungsbeitrag

**rrudorfer** · 2015-05-04 · [Beitrag #1](https://www.typo3.net/d/120161-maxwintext-vs-sourcecollection/1)

Hallo, Forum!

Folgender Fall:
Ich habe eine sourceCollection definiert, die die maximalen Bildbreiten mit maxW definiert...
Sehe ich das richtig, dass die sourceCollection-Definition tt_content.image.20.maxW bzw. die entsprechende Konstante ersetzt? Wenn also eine sourceCollection definiert wurde, wird diese für die Bildgrößen verwendet... Das ist soweit auch ok...

Aber wie ist das bei maxWInText?
Mir kommt vor, also würde die sourceCollection mit der maxW-Angabe auch für maxWInText gelten... :(  Ist das tatsächlich so?
Kann man eine eigene sourceCollection auch für maxWInText definieren?

```typoscript
	sourceCollection {
		small >
		smallRetina >
		small.maxW = 480
		medium.maxW = 800
		medium.mediaQuery = (min-width: 481px)
		large.maxW = 3000
		large.mediaQuery = (min-width: 801px)	
	}
```

Cool wäre einfach ein

```typoscript
	sourceCollection {
		small >
		smallRetina >
		small.maxW = 480
		small.maxWInText = 240
		medium.maxW = 800
		medium.maxWInText = 400
		medium.mediaQuery = (min-width: 481px)
		large.maxW = 3000
		large.maxWInText = 1500
		large.mediaQuery = (min-width: 801px)	
	}
```

Danke für eure Infos, ciao,
Roman

## Antworten

### [#2](https://www.typo3.net/d/120161-maxwintext-vs-sourcecollection/2) · hardcoder · 2015-05-28

Hi,

möglicherweise ist das ein Hinweis der helfen könnte (ungetestet):

```typoscript
temp.sourceCollectionImage {
	large {
		dataKey = large
		mediaQuery = (min-device-width: 1200px)
		srcsetCandidate = 1170w
		#width = 1170 # Default sourceCollection as an example # Please write your own sourceCollection (highly recommended)
		maxW = 1170
	}
...
...

temp.sourceCollectionImageInText {
	large {
		dataKey = large
		mediaQuery = (min-device-width: 1200px)
		srcsetCandidate = 1170w
		#width = 1170 # Default sourceCollection as an example # Please write your own sourceCollection (highly recommended)
		maxW = 585
	}
...
...


tt_content.image.20.1.sourceCollection >
tt_content.image.20.1.sourceCollection < temp.sourceCollectionImage

tt_content.textpic.20.1.sourceCollection >
tt_content.textpic.20.1.sourceCollection < temp.sourceCollectionImageInText
```

---

Quelle: „maxWInText vs sourceCollection“, typo3.net, https://www.typo3.net/d/120161-maxwintext-vs-sourcecollection
Beiträge von Mitgliedern des Forums. Bitte mit Link auf die Diskussion zitieren.
