简体   繁体   English

带有链接的Typo3 6.2图像标题

[英]Typo3 6.2 image caption with link

I'm trying to make the image captions to link to the image link on Typo3 6.2. 我正在尝试使图像标题链接到Typo3 6.2上的图像链接。

I already tried this but no lucky: 我已经尝试过了,但是并不幸运:

tt_content.image.20.caption.1.stdWrap.typolink.parameter.field = image_link

I have this typoscript from Bootstrap Package: 我有来自Bootstrap软件包的这份打字稿:

...
    singleCaption {
        singleStdWrap {
            wrap {
                override.cObject = COA
                override.cObject {
                    10 = TEXT
                    10 {
                        value = <figure class="image###CLASSES###">|###CAPTION###</figure>
                        override = <figure class="thumbnail###CLASSES###">|###CAPTION###</figure>
                        override {
                            if {
                                value = 1
                                equals.field = imageborder
                            }
                        }                            
                    }
                }
            }
        }
        caption {
            wrap = <caption class="caption###CLASSES###"> | </caption>
            wrap.override = <figcaption class="caption###CLASSES###"> | </figcaption>
        }
    }
 ...

How can I make my captions linkable to the image link? 如何使字幕可链接到图像链接? This should be so simple but I can't figure it out how. 这应该很简单,但我不知道如何做到。 Thanks for helping! 感谢您的帮助!

试试这个,它可能会做到:

tt_content.image.20.caption.1.stdWrap.typolink.parameter.data = file:current:link

another way is to enable linking on captions generally: 另一种方法是启用字幕的链接:


Image Captions linked (generally, if no link has been defined, the image source will be taken) 链接的图像标题(通常,如果未定义链接,将获取图像源)

tt_content.image.20.caption.1.stdWrap.typolink < tt_content.image.20.1.imageLinkWrap.typolink

Image Captions linked (only if caption link has been set) 链接了图像标题(仅在设置了标题链接的情况下)

tt_content.image.20.caption.1.stdWrap.typolink.parameter.data = file:current:link

--> thx to Ravi Dhoriya ツ ->到拉维·多里亚(th)

cheers 干杯

Can you try something like: 您可以尝试以下方法吗:

... .singleCaption.caption.stdWrap.typolink.parameter.field = image_link

As you are "manually" rendering your content with the TS from the bootstrap package, I think you should apply the additional TypoScript there, not in the tt_content TS from css_styled_content. 当您通过bootstrap包中的TS“手动”呈现内容时,我认为您应该在此处应用其他TypoScript,而不是在css_styled_content的tt_content TS中。

Simply try to remove the trim = 1 from stdWrap . 只需尝试从stdWrap删除trim = 1 stdWrap

tt_content.image.20.caption.1.1.trim >

That means also that you must not have any newlines in your caption. 这也意味着您的标题中不得包含任何换行符。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM