tt_products imageLinkWrap每个图像的typolink标题

时间:2014-05-07 06:40:48

标签: image split typo3 title typoscript

我使用tt_products并尝试获取图像的每个链接的“标题”参数,这不是从此扩展中提供的。我有一些免费的数据表字段,其中id用于存储每个链接的标题。

这是渲染每个链接和图像后示例在前端中的样子。

<a href="Bild1.jpg" title="Titel1" rel"lightbox><img alt="" src="Bild1.jpg"></a>
<a href="Bild2.jpg" title="Titel2" rel"lightbox><img alt="" src="Bild2.jpg"></a>
<a href="Bild3.jpg" title="Titel3" rel"lightbox><img alt="" src="Bild3.jpg"></a>

这是我到目前为止所解决的解决方案,它从字段中加载内容但是它不会将字段的内容分开并将它们分配到正确的图像

temp.imageLinkWrap = 1
temp.imageLinkWrap {
    stdWrap = stdWrap
    enable = 1  
    typolink {

        parameter.cObject = IMG_RESOURCE
        parameter.cObject.file.import.data = TSFE:lastImageInfo|origFile
        parameter.cObject.file.maxW = {$plugin.perfectlightbox.lightBoxMaxW}
        parameter.cObject.file.maxH = {$plugin.perfectlightbox.lightBoxMaxH}        
        parameter.override.listNum.stdWrap.data = register : IMAGE_NUM_CURRENT


        title >
        title.override.cObject = COA
        title.override.cObject {
            10 = TEXT
            10{
                data {
                    data = GP:tt_products|product
                    intval = 0
                    wrap = DB:tt_products: | :image
                }
                split{
                    token = ,
                    cObjNum = 1
                    1.current = 1
                    # for each image, add the imagecaption
                    1.wrap = |
                    1.append = TEXT
                    1.append {
                        data {
                            data = GP:tt_products|product
                            intval = 1
                            wrap = DB:tt_products: | :quality
                        }
                        # split saves the index in REGISTER:SPLIT_COUNT
                        listNum.stdWrap.data = REGISTER:SPLIT_COUNT
                        listNum.splitChar = 10
                    }
                }
            }
        }

        title.override.if.isTrue = 1
        title.insertData = 1
        parameter.cObject = IMG_RESOURCE
        parameter.cObject.file.import.data = TSFE:lastImageInfo|origFile

        ATagParams >
        ATagParams.cObject = COA
        ATagParams.cObject {
            10 = TEXT
            10.value = rel="lightbox[lb{field:uid}]"
        }

        ATagParams.insertData = 1
    }
}


    plugin.tt_products {
        templateFile = fileadmin/template/html/partial/ext/shop-tmpl.html
        pid_list = 23
        wrapInBaseClass = 0
        requiredInfoFields = agb, name, address, zip, city, email
        limitImageSingle = 6
        separateImage = 1
        listImage < .image
        listImage.file.maxW = 300
        listImage.file.maxH = 
        listImage.imageLinkWrap >
        image.wrap = <div class="img_single"> | </div>
        usePageContentImage = 0
        imageLinkWrap = 1
        image {
            altText = TEXT
            altText.data = field:title
            imageLinkWrap >
            imageLinkWrap < temp.imageLinkWrap
        }
    }

0 个答案:

没有答案