[TYPO3-commerce] How-To: multiple images
Franz Koch
typo.removeformessage at fx-graefix.de
Sun Sep 2 22:52:10 CEST 2007
Hi guys,
> Will be glad to hear your comments how to improve or/and simplify this
> TS or other ways to display several images per product.
> In general if someone has other tips and tricks for commerce please
> share you knowledge with community. Please add "How-To:" pattern in
> front of such message.
Thanks for this posting. Based on that I came to a much easier solution
based on only TS with much more flexibility I think, as you can use the
power of optionSplit as well as COA for every image:
---------
lib.tx_commerce.products.fields {
images >
images = stdWrap
images {
setContentToCurrent = 1
split {
token = ,
# configuring optionSplit - the first record should
# use rendering 1 which is a big image, every
# other following record should use rendering 2
cObjNum = 1||2
# big image
1.10 = IMAGE
1.10 {
file {
import = uploads/tx_commerce/
import.current = 1
maxW = 250
}
imageLinkWrap < tt_content.image.20.1.imageLinkWrap
imageLinkWrap.enable >
imageLinkWrap.enable = 1
wrap = |<br />
}
# small image
2 < .1
2.10.file {
width = 60c
height = 60c
maxW = 60
maxH = 60
ext = jpg
}
2.10.wrap >
}
}
teaserimages >
teaserimages < .images
teaserimages {
# only render 1 image, to limit the optionsplit to 1
split.max = 1
split.1.10 {
# alter rendering for teaser image
file {
width = 140m
height = 105m
maxW = 140
maxH = 105
}
wrap >
# don't apply clickenlarge
imageLinkWrap >
}
}
}
--------
In my case, I don't use the field for teaser images, so I do the
following to alter the rendering for listView:
--------
plugin.tx_commerce_pi1.listView {
products.fields.images < .products.fields.teaserimages
}
--------
Hope that helps someone.
--
Kind regards,
Franz Koch
More information about the TYPO3-project-commerce
mailing list