[TYPO3-english] Painful TS problem & different image sizes in datastructure

Aneta Jaroslava aneta2000 at hotmail.com
Thu Aug 20 20:22:35 CEST 2009


Hi all,

I am usung t3 v4.2.8 with latest TV

I have a field (imgsize) where i have the imgsizes available.
no img = 2, squared = 1 and landscape = 0

In the field image, below these values are worked with in the TS.
This is the if equals thing.

the below things are working like charming.

But now I need sth. like for no image.

the ts is the test TS. The TS for 5 does not work, because ALL 3 image  
sizes are displayed.
I tried the 5 to negate, so I thought 10 and 20 would bot be executed, but  
thats not the case.
In fact, If the value is 2 5.xxx 10.xx and 20.xxxshould *not* be displayed.

Any suggestions for that? In fact its more a TS than a TV matter ;-)

Help would be highly appreciated!

Thanks

test-start-
5 = IMAGE
5.wrap = <div class="left">|</div>
5.file = GIFBUILDER
5.file {
   XY = 10,10
   10 = IMAGE
   10.file.import = uploads/tx_templavoila/
   10.file.import.current = 1
   10.file.import.listNum = 0
   10.file.import.required = 1
   10.file.maxW = 128
   10.file.minW = 128
   10.file.maxH = 128
   10.file.minH = 128
}

5.if {
   value.field = imgsize
   equals = 1
   negate = 1
}

test-end

<image type="array">
	<tx_templavoila type="array">
		<title>image</title>
		<description>image</description>
		<sample_data type="array">
			<numIndex index="0">image</numIndex>
		</sample_data>
		<eType>imagefixed</eType>
		<proc type="array">
			<HSC type="integer">0</HSC>
		</proc>
<TypoScript>
<![CDATA[

10 = IMAGE
10.wrap = <div class="left">|</div>
10.file = GIFBUILDER
10.file {
   XY = 128,128
   10 = IMAGE
   10.file.import = uploads/tx_templavoila/
   10.file.import.current = 1
   10.file.import.listNum = 0
}

10.if {
   value.field = imgsize
   equals = 1
   negate = 1
}



20 < .10
20.file.XY = 210,73
20.if {
   value.field = imgsize
   equals = 1
   negate = 1
}


]]>
</TypoScript>
	</tx_templavoila>
	<TCEforms type="array">
		<config type="array">
			<type>group</type>
			<internal_type>file</internal_type>
			<allowed>gif,png,jpg,jpeg</allowed>
			<max_size>1000</max_size>
			<uploadfolder>uploads/tx_templavoila</uploadfolder>
			<show_thumbs>1</show_thumbs>
			<maxitems>1</maxitems>
			<minitems>0</minitems>
		</config>
		<label>image</label>
	</TCEforms>
</image>

<imgsize type="array">
	<tx_templavoila type="array">
		<title>imgsize</title>
		<description>image size</description>
		<sample_data type="array">
			<numIndex index="0">image size</numIndex>
		</sample_data>
		<eType>select</eType>
	</tx_templavoila>
	<TCEforms type="array">
		<config type="array">
			<type>select</type>
			<items type="array">

<numIndex index="0" type="array">
	<numIndex index="0">no image</numIndex>
	<numIndex index="1">2</numIndex>
</numIndex>
<numIndex index="1" type="array">
	<numIndex index="0">squared</numIndex>
	<numIndex index="1">1</numIndex>					
</numIndex>
<numIndex index="2" type="array">
	<numIndex index="0">landscape</numIndex>
	<numIndex index="1">0</numIndex>					
</numIndex>

			</items>
			<default>0</default>
		</config>
		<label>image size</label>
	</TCEforms>
</imgsize>


More information about the TYPO3-english mailing list