[TYPO3-templavoila] Inserting Image<->Link Pairs

Felix Buenemann Felix.Buenemann at gmx.de
Mon Nov 3 04:32:47 CET 2008


Hi,

I have a template that has an image list element to specify an arbitrary
number of images for which thumbnails are created via typoscript in the
template xml.

Now I would like to be able to specify a link for each image, so the
image becomes a link to a user-defined internal page.

Currently my only idea how to solve this would be adding a second field
with editing type "Link field" which accepts multiple entries and links
those to the images via typoscript using the same order as the images.

Is there a cleaner/better way to do this or is this the only way?

The current TS code looks like this (I'm currently linking each image to
a lightbox, but want to change it to the behaviour described above):

<TypoScript>
	10 = TEXT
	10.field = field_images
	10.split {
		token = ,
		cObjNum = 1
		1 {
			10 = IMAGE
			10.stdWrap.typolink.parameter.current = 1
			10.stdWrap.typolink.parameter.wrap = uploads/tx_templavoila/|
			10.stdWrap.typolink.ATagParams = rel="shadowbox[grouped_images]"
			10.file = GIFBUILDER
			10.file {
				XY = 68,68
				10 = IMAGE
				10.file.import = uploads/tx_templavoila/
				10.file.import.current = 1
				10.file.import.listNum = 0
				10.file.maxW = 68
				10.file.minW = 68
				10.file.maxH = 68
				10.file.minH = 68
			}
		}
	}
</TypoScript>

-- Felix Buenemann


More information about the TYPO3-project-templavoila mailing list