TYPO3基于imagecols字段添加类

时间:2017-12-14 11:40:28

标签: image typo3 typoscript

我将我的网站从V6更新为V8,现在在图像的内容呈现方面存在一些问题。

我使用扩展bootstrap_core扩展,它基本上用引导网格类包装每个标准CType - 'col-sm-6'等。

然而,在V8上,它不再起作用了。

这里我附上了对此行为负责的错别字:

tt_content.image {
20 {
    caption.1.1.dataWrap = <p class="caption-{field:imagecaption_position}">|</p>
    1 {
        # image styles (rounded, circle)
        params.cObject = CASE
        params.cObject {
            key.field = layout
            # Default is responsive
            default = TEXT
            default.value = class="img-responsive img-content"
            # Normal
            1 = TEXT
            1.value = class="img-content"
            # Rounded corners
            2 = TEXT
            2.value = class="img-rounded img-content"
            3 = TEXT
            3.value = class="img-rounded img-responsive img-content"
            # Circle
            4 = TEXT
            4.value = class="img-circle img-content"
            5 = TEXT
            5.value = class="img-circle img-responsive img-content"
        }
    }
    addClassesCol.ifEmpty =
    addClassesCol.override.cObject = COA
    addClassesCol.override.cObject {
        10 = CASE
        10 {
            key.field = imagecols
            default = TEXT
            default.value = col-md-12
            2 < .default
            2.value = col-md-6 col-sm-6
            3 < .default
            3.value = col-md-4 col-sm-4 col-xs-6
            4 < .default
            4.value = col-md-3 col-sm-4 col-xs-6
            6 < .default
            6.value = col-md-2 col-sm-3 col-xs-4
        }
    }
    addClassesCol.override =
    addClassesCol.override.if {
        isGreaterThan.field = imagecols
        value = 1
    }
    addClassesImage >
    layout {
        default.override >
        default.value = <div class="img-center img-above###CLASSES###">###IMAGES######TEXT###</div>
        1.override >
        1.value = <div class="img-right img-above###CLASSES###">###IMAGES######TEXT###</div>
        2.override >
        2.value = <div class="img-left img-below###CLASSES###">###IMAGES######TEXT###</div>
        8.override >
        8.value = <div class="img-center img-below###CLASSES###">###TEXT######IMAGES###</div>
        9.override >
        9.value = <div class="img-right img-below###CLASSES###">###TEXT######IMAGES###</div>
        10.override >
        10.value = <div class="img-left img-below###CLASSES###">###TEXT######IMAGES###</div>
        17.override >
        17.value = <div class="img-intext-right img-intext###CLASSES###">###IMAGES######TEXT###</div>
        18.override >
        18.value = <div class="img-intext-left img-intext###CLASSES###">###IMAGES######TEXT###</div>
        25.value = <div class="img-beside-right img-beside###CLASSES###">###IMAGES######TEXT###</div>
        25.override >
        25.override = <div class="img-header-{field:header_layout} img-beside-right img-beside###CLASSES###">###IMAGES######TEXT###</div>
        25.override.if.isTrue.field = header
        25.override.insertData = 1
        26.value = <div class="img-beside-left img-beside###CLASSES###">###IMAGES######TEXT###</div>
        26.override >
        26.override = <div class="img-header-{field:header_layout} img-beside-left img-beside###CLASSES###">###IMAGES######TEXT###</div>
        26.override.if.isTrue.field = header
        26.override.insertData = 1
    }
    rendering {
        singleNoCaption {
            allStdWrap {
                dataWrap = <div class="img-wrap"> | </div>
                dataWrap.override >
                innerWrap.cObject.0.value = <div class="img-center-outer"><div class="img-center-inner"> | </div></div>
                innerWrap.cObject.8.value = <div class="img-center-outer"><div class="img-center-inner"> | </div></div>
            }
            singleStdWrap {
                wrap = <figure class="image###CLASSES###">|</figure>
                wrap {
                    override = <figure class="image lightbox###CLASSES###">|</figure>
                    override.if {
                        value = 1
                        equals.field = image_zoom
                        equals.data >
                    }
                }
            }
        }
        noCaption {
            allStdWrap {
                dataWrap = <div class="img-wrap"> | </div>
                dataWrap.override >
            }
            singleStdWrap {
                wrap = <figure class="image###CLASSES###">|</figure>
                wrap {
                    override = <figure class="image lightbox###CLASSES###">|</figure>
                    override.if {
                        value = 1
                        equals.field = image_zoom
                        equals.data >
                    }
                }
            }
            rowStdWrap.wrap = <div class="row row-images"> | </div>
            noRowsStdWrap.wrap = <div class="row row-images"> | </div>
            lastRowStdWrap.wrap = <div class="row row-images"> | </div>
            columnStdWrap.wrap = <div class="col-image###CLASSES###"> | </div>
        }
        singleCaption {
            singleStdWrap {
                wrap = <figure class="image###CLASSES###">|###CAPTION###</figure>
                wrap {
                    override = <figure class="image lightbox###CLASSES###">|###CAPTION###</figure>
                    override.if {
                        value = 1
                        equals.field = image_zoom
                        equals.data >
                    }
                }
            }
            caption {
                wrap = <figcaption class="caption"> | </figcaption>
                wrap.override >
            }
        }
        splitCaption {
            singleStdWrap {
                wrap = <figure class="image###CLASSES###">|###CAPTION###</figure>
                wrap {
                    override = <figure class="image lightbox###CLASSES###">|###CAPTION###</figure>
                    override.if {
                        value = 1
                        equals.field = image_zoom
                        equals.data >
                    }
                }
            }
            caption {
                wrap = <figcaption class="caption"> | </figcaption>
                wrap.override >
            }
            rowStdWrap.wrap = <div class="row row-images"> | </div>
            noRowsStdWrap.wrap = <div class="row row-images"> | </div>
            lastRowStdWrap.wrap = <div class="row row-images"> | </div>
            columnStdWrap.wrap = <div class="col-image###CLASSES###"> | </div>
        }
        globalCaption {
            allStdWrap {
                dataWrap = <figure class="img-wrap"> | ###CAPTION###</figure>
            }
            singleStdWrap {
                wrap = <div class="image###CLASSES###"> | </div>
                wrap {
                    override = <div class="image lightbox###CLASSES###">|</div>
                    override.if {
                        value = 1
                        equals.field = image_zoom
                        equals.data >
                    }
                }
            }
            caption.wrap = <figcaption class="caption"> | </figcaption>
            rowStdWrap.wrap = <div class="row row-images"> | </div>
            noRowsStdWrap.wrap = <div class="row row-images"> | </div>
            lastRowStdWrap.wrap = <div class="row row-images"> | </div>
            columnStdWrap.wrap = <div class="col-image###CLASSES###"> | </div>
        }
    }
}

我知道现在在V8上没有section_frame,而是frame_class。这是框架的错别字:

tt_content.stdWrap {
    # related to section_frame
    innerWrap.cObject {
        # Special wraps for specific frames
        default {
            10 {
                cObject {
                    default.value = <div
                    default.override = <div id="c{field:uid}"
                    default.override.if {
                        value = 1
                        equals.field = sectionIndex
                    }
                    menu.value = <nav id="c{field:uid}"
                    menu.override >
                }
            }
            20.10.value >

            # responsive visibility settings
            20.15 = TEXT
            20.15.value.field = tx_bootstrapcore_visibility
            20.15.noTrimWrap = | | |
            20.15.required = 1

            30 {
                cObject {
                    menu.value = >|</nav>
                    menu.override >
                    default.value >
                    default = CASE
                    default {
                        key.field = frame_class
                        default = TEXT
                        default.value = >|</div>
                        # Add  close button for alert boxes
                        40 = TEXT
                        40.value = ><button type="button" class="close" data-dismiss="alert">&times;</button>|</div>
                        41 < .40
                        42 < .40
                        43 < .40
                    }
                }
            }
        }

        # Ruler before
        5.5 = TEXT
        5.5.value = <hr>

        # Ruler after
        6.35 = TEXT
        6.35.value = <hr>

        # Indent
        10 {
            5 = TEXT
            5.value = <div class="row">
            20.10.value = col-xs-11 col-xs-push-1
            35 = TEXT
            35.value = </div>
        }
        # Indent 33/66
        11 =< tt_content.stdWrap.innerWrap.cObject.10
        11.20.10.value = col-xs-8 col-xs-push-4
        # Indent 66/33
        12 =< tt_content.stdWrap.innerWrap.cObject.10
        12.20.10.value = frame col-xs-8

        # Jumbotron
        20.20.10.value = jumbotron
        # Wells
        21.20.10.value = well
        22 =< tt_content.stdWrap.innerWrap.cObject.default
        22.20.10.value = well well-sm
        23 =< tt_content.stdWrap.innerWrap.cObject.default
        23.20.10.value = well well-lg

        # Alerts
        40 =< tt_content.stdWrap.innerWrap.cObject.default
        40.20.10.value = alert alert-info
        41 =< tt_content.stdWrap.innerWrap.cObject.default
        41.20.10.value = alert alert-success
        42 =< tt_content.stdWrap.innerWrap.cObject.default
        42.20.10.value = alert alert-warning
        43 =< tt_content.stdWrap.innerWrap.cObject.default
        43.20.10.value = alert alert-danger

        # anchor only if sectionIndex is used
        66.10 {
            value =
            override = <a id="c{field:uid}"></a>
            override.if.value = 1
            override.if.equals.field = sectionIndex
        }
    }
}

我将key.field从section_frame更改为class_frame。

然而渲染仍然无效。

如果需要提供其他信息,没问题。

0 个答案:

没有答案