未捕获错误:语法错误,无法识别的表达式:Magnific Popup Gallery + {{image.path}}

时间:2017-03-07 16:49:30

标签: octobercms

我用于照相馆插件Cool gallery与RainLab博客整合https://octobercms.com/plugin/pollozen-simplegallery

在模板中链接图片:

{% for image in gallery.images %}
<a href="{{ url('/') }}{{ image.path }}" class="thumb_image"><img src="{{ image.thumb(300,250) }}" class="img-responsive" alt=""></a>

{%endfor%}

对于JS gallery i USE:

        $('#gallery_in_post').magnificPopup({
            delegate: 'a',
            type: 'image',
            tLoading: 'Loading image #%curr%...',
            mainClass: 'mfp-img-mobile',
            gallery: {
                enabled: true,
                navigateByImgClick: true,
                preload: [0,1] // Will preload 0 - before current, and 1 after the current image
            },
            image: {
                tError: '<a href="%url%">The image #%curr%</a> could not be loaded.',
                titleSrc: function(item) {
                    return item.el.children()[0].attributes['title'].value + '<small>' + item.el.children()[0].attributes['alt'].value + '</small>';
                }
            }
        });

但是当我点击大图片上的链接时,得到:

未捕获错误:语法错误,无法识别的表达式:

0 个答案:

没有答案