[TYPO3-english] FAL fetch image with listNum

Arno Dudek webmaster at adgrafik.at
Wed Jul 10 10:07:23 CEST 2013


Perhaps there was a little bit less information :)

I used the FILES CE in a HMENU and solved it this way, but looking for a 
better solution:

20 = HMENU
20 {
	special = directory
	special.value.field = pages

	1 = TMENU
	1 {

		NO {

			doNotLinkIt = 1

			stdWrap.cObject = LOAD_REGISTER
			stdWrap.cObject.counter = 0

			stdWrap.append = FILES
			stdWrap.append {

				references {
					table = pages
					uid.data = pages
					fieldName = media
				}

				renderObj = COA
				renderObj {

					20 = IMAGE
					20 {
						file.import.data = file:current:publicUrl
						file.width = 240
						wrap = <span class="recto"> | </span>
					}

					if {

						value {
							cObject = LOAD_REGISTER
							cObject.counter.data = register: counter
							cObject.counter.stdWrap.wrap = | + 1
							cObject.counter.prioriCalc = 1

							append = TEXT
							append.data = register: counter
						}

						equals = 1
					}

					stdWrap.required = 1
					stdWrap.typolink.parameter.field = uid
					stdWrap.wrap = <li> | </li>
				}
			}
		}

		stdWrap.outerWrap = <ul> | </ul>
	}
}

I saw some examples with references.data = levelmedia: -1, slide
which I can't used here. If I print out the data with debugData, the 
media field contains the images with an path (../../fileadmin/[...]) and 
no UIDs.

There also was an other problem. The LOAD_REGISTER get lost on the way. 
Before I set

renderObj.10 = LOAD_REGISTER

In the doc the parsing order should be 1,2,3…, if etc.
But the registered variable I set in "10" was not defined in

if.value.data = register: counter

I solved it in the way to set the variable in the if function directly.

lg arno


Am 09.07.13 17:06, schrieb Arno Dudek:
> Hi list!
>
> I searched today for a solution to get the first or second image out of
> the pages media field, but didn't find a solution. Is this already
> implemented/possible in v6.0.6?
>
> I just found only a solution with levelfield, but I use it like this:
>
> references {
>      table = pages
>      uid.data = pages
>      fieldName = media
> }
>
> lg arno



More information about the TYPO3-english mailing list