[TYPO3-german] CONTENT Bilder unterschiedlich skalieren je: Hochformat / Querformat, geht das?

Thomas Hirt info at thomas-hirt.at
Fri Oct 30 18:51:21 CET 2009


Jetzt ist mir aber doch noch etwas aufgefallen:

120m funktioniert gut aber nicht ganz genau so wie ich es eigentlich brauche:

Bei einem Hochformatbild möchte ich width = 80m und bei einem Querformatbild width = 120m.

Mit width: 120m und height 120m hat das Bild zwar tatsächlich eine max. Höhe und Breite, aber ein Hochformat Bild ist 
nicht immer 80Pixel breit. Je nachdem wann die vertikale Dimension des Bildes 120 Pixel erreicht, wird das Maß der 
Horizontalen Dimension proportional skaliert. Kann also auch größer oder kleiner als 80 sein.

Deswegen auch mein Ansatz:

daher wenn: TSFE:lastImageInfo|0 - TSFE:lastImageInfo|1 = positiv, ist das Bild Querformat
und wenn: TSFE:lastImageInfo|0 - TSFE:lastImageInfo|1 = negativ, ist das Bild Hochformat

Könnte man so etwas nicht hier einbauen (mit einer if Abfrage):

temp.test = COA
temp.test {

   10 = CONTENT
   10.wrap = <div id="content-bilderspalte" style="width: 142px;"> | </div>
   10 {
     table = tt_content
     select.selectFields = image
     select.begin=1
     renderObj = COA
     renderObj {
       10 = TEXT
       10 {
         field = image
         split {
           token = ,
           cObjNum = 1
           1 {
             10 = IMAGE
             10 {
               file {
                 import=uploads/pics/
                 import.current = 1
                 maxW = 120
                 maxH = 120
               }
             }
           }
         }
       }
     }
   }
}




Thomas Hirt schrieb:
> Aja, stimmt!
> Hatte kein Hochformatbild hochgeladen.
> Danke für die Geduld.
> 
> Thomas
> 
> 
> JoH asenau schrieb:
>> Und genau das wird mit
>>
>> width = 120m
>> height = 120m
>>
>> erreicht.
>>
>> Je nachdem, welche Seite zuerst die 120 Pixel Grenze überschreitet, 
>> bleibt
>> die jeweils andere Seite mit der proportional passenden Größe 
>> erhalten. Wenn
>> das bei Dir nicht geklappt hat, hast Du es vermutlich nicht korrekt
>> eingebaut.
>>
>> HTH
>>
>> Joey


More information about the TYPO3-german mailing list