---
title: "[Frage] Bildgröße abhängig von Select Auswahl"
url: "https://www.typo3.net/d/115563-frage-bildgroesse-abhaengig-von-select-auswahl"
source: "typo3.net"
tags: ["Archiv","TemplaVoilà","Frage","TYPO3 4"]
created: "2013-07-28"
last_reply: "2013-07-29"
replies: 2
solved: false
page: 1
pages: 1
lang: "de"
---

# [Frage] Bildgröße abhängig von Select Auswahl

Archiv › TemplaVoilà · 2 Antworten · gestartet 2013-07-28

## Eröffnungsbeitrag

**Greenhorn2013** · 2013-07-28 · [Beitrag #1](https://www.typo3.net/d/115563-frage-bildgroesse-abhaengig-von-select-auswahl/1)

Ich habe 2 Felder im CE von TV erstellt die per Select Auswahl gesteuert werden.
Jetzt möchte ich diese dazu nutzen die Bildgröße zu steuern im selben CE.
Folgenden Code habe ich erstellt, doch leider passiert dabei nichts :(

```typoscript
10 = IMAGE
10{
  file{
    import=uploads/tx_templavoila/
    import{
      current = 1
      listNum = 0
      }      
    maxW=CASE	
    maxW{
      key.field=field_breite
      default=TEXT
      default.value=120
      
      }
    minW<.maxW
    
    maxH=CASE
    maxH{
      key.field=field_height
      default=TEXT      
      default.value=120
      }
    minH<.maxH
    }
```

## Antworten

### [#2](https://www.typo3.net/d/115563-frage-bildgroesse-abhaengig-von-select-auswahl/2) · mischa · 2013-07-29

Hi,

maxW und maxH können lt. TSRef sowohl INT als auch stdWrap sein.
Damit müsste das Bild wie folgt gerendert werden können:

```typoscript
10 = IMAGE
10 {
	file {
		import=uploads/tx_templavoila/
		import{
			current = 1
			listNum = 0
		}
		maxW.stdWrap.field = field_breite
		maxH.stdWrap.field = field_height
	}
}
```

u.U. gehört dass stdWrap auch raus. Da bin ich mir gerade nicht sicher.
Wenn das auch nicht klappt, mal ein

```typoscript
10 = IMAGE
10 {
	file {
		import=uploads/tx_templavoila/
		import{
			current = 1
			listNum = 0
		}
		maxW.data.field = field_breite
		maxH.data.field = field_height
	}
}
```

probieren.

### [#3](https://www.typo3.net/d/115563-frage-bildgroesse-abhaengig-von-select-auswahl/3) · Greenhorn2013 · 2013-07-29

Hallo Danke für deine Antwort, da die felder field_breite und field_height css Klassen beinhalten wollte ich das via CASE abbilden um die korrekten Breiten anzugeben.

Ich hatte mir gerade noch folgendes ausgedeacht. das problem ist hier nur, das double und triple im ersten CASE nicht zum tragen kommen, sondern nur default

```typoscript
tmp.tileImage = IMAGE
tmp.tileImage{
  altText.field = field_altimage
  titleText.field = field_titleimage
  file{
      import = uploads/tx_templavoila/
      import{
            current=1
            listNum=0
            }
      }
  stdWrap{
         typolink.parameter.field = field_link
         }
  }

lib.tileImage = CASE
lib.tileImage{
  key.field=field_width
  default = CASE
  default{
     key.field=field_height
     default < tmp.tileImage
     default{
        file{
          width=120
          height=120
          }
        }
     double-vertical<tmp.tileImage
     double-vertical{
        file{
          width=120
          height=250
          }
        }
     triple-vertical<tmp.tileImage
     triple-vertical{
        file{
          width=120
          height=380
          }
        }
     quadro-vertical<tmp.tileImage
     quadro-vertical{
        file{
          width=120
          height=510
          }
        }
     pento-vertical<tmp.tileImage
     pento-vertical{
        file{
          width=120
          height=640
          }
        }
     }
  half<.default
  half{
    default.file{
      width=55
      height=55
      }
    double-vertical.file{
      width=55
      height=120
      }
    triple-vertical.file{
      width=55
      height=180
      }
    quadro-vertical.file{
      width=55
      height=240
      }
    pento-vertical.file{
      width=55
      height=300
      }
    }
  double<.default
  double{
    default.file{
      width  = 250
      height = 120
      }
    double-vertical.file{
      width  = 250
      height = 250
      }
    triple-vertical.file{
      width  = 250
      height = 370 
      }
    quadro-vertical.file{
      width  = 250
      height = 490
      }
    pento-vertical.file{
      width  = 250
      height = 610
      }
    }
  triple<.default
  triple{
    default.file{
      width  = 370
      height = 120
      }
    double-vertical.file{
      width  = 370
      height = 250
      }
    triple-vertical.file{
      width  = 370
      height = 370
      }
    quadro-vertical.file{
      width  = 370
      height = 490
      }
    pento-vertical.file{
      width  = 370
      height = 610
      }
    }
  }
```

---

Quelle: „[Frage] Bildgröße abhängig von Select Auswahl“, typo3.net, https://www.typo3.net/d/115563-frage-bildgroesse-abhaengig-von-select-auswahl
Beiträge von Mitgliedern des Forums. Bitte mit Link auf die Diskussion zitieren.
