简体   繁体   English

TYPO3新闻灯箱

[英]TYPO3 News Lightbox

TYPO3 6.2.13, News (tx_news) 3.2.2, Detail views. TYPO3 6.2.13,新闻(tx_news)3.2.2,详细信息视图。

Is there a setting to have pop-ups for any image in the detail views? 是否有设置可在详细视图中为任何图像弹出窗口?

I see I may use TS plugin.tx_news.settings.detail.media.image.lightbox.enabled , but I am not sure about what it is supposed to output. 我看到我可以使用TS plugin.tx_news.settings.detail.media.image.lightbox.enabled ,但是我不确定应该输出什么。

Moreover, is there a way/instructions to integrate something like lightbox into templates for News views? 此外,是否有一种方法/说明将Lightbox之类的东西集成到News视图的模板中? thks 谢谢

You can add configuration in your TypoScript setyp (fancybox example): 您可以在TypoScript setyp中添加配置(fancybox示例):

plugin.tx_news.settings.detail.media {
 image {
        lightbox {
            enabled = 1
            class = fancybox
            width = 200
            height = 200
            rel = fancybox[myImageSet]
        }
      }
 }

And in your JS file add: 然后在您的JS文件中添加:

$(document).ready(function() {
    $(".fancybox").fancybox();
});

You will have to include appropriate JS files. 您将必须包含适当的JS文件。

It helped me 3 years later. 三年后,它对我有所帮助。 but there is something wrong in your code, detaildetail ... better for other people are also looking for that is, only one detail :-) 但是您的代码中有错误,detaildetail ...对其他人来说也更好,那就是只查找一个细节:-)

plugin.tx_news.settings.detail.media {
  image {
    lightbox {
        enabled = 1
        class = fancybox
        width = 200
        height = 200
        rel = fancybox[myImageSet]
    }
  }

} }

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

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