0

我在typo3中添加了一张图片。它在页面中显示了额外的 div。

  <div class="csc-textpic csc-textpic-center csc-textpic-above">
    <div class="csc-textpic-imagewrap" data-csc-images="1" data-csc-cols="2">
        <div class="csc-textpic-center-outer">
            <div class="csc-textpic-center-inner">
            <figure class="csc-textpic-image csc-textpic-last">
                <img src="fileadmin/user_upload/aetuts.jpg" width="200" height="50" alt=""></figure>
            </div>
        </div>
    </div>
</div>

我想要这样的东西

 <img src="fileadmin/user_upload/aetuts.jpg" width="200" height="50" alt="">  

没有额外的包装。

我可以做这样的事情来删除内容周围的额外 wapper。

tt_content.stdWrap.innerWrap >

图像怎么做?

4

1 回答 1

2

关于你的具体问题

以下代码应删除图像周围的所有环绕。请记住,这也会删除定位和浮动能力。

# Remove some wraps
tt_content.image.20.imageStdWrap.dataWrap >
tt_content.image.20.imageStdWrapNoWidth.dataWrap >
tt_content.image.20.imageColumnStdWrap.dataWrap >

# Redefine the layout switch with only one default case
tt_content.image.20.layout >
tt_content.image.20.layout = CASE
tt_content.image.20.layout.key.field = imageorient
tt_content.image.20.layout.default = TEXT
tt_content.image.20.layout.default.value = ###IMAGES### ###TEXT###

# Remove the wrap around the image subtext
tt_content.textpic.20.text.wrap = |

# Define a new rendering method without wraps
tt_content.image.20.rendering.noWraps {
  imageRowStdWrap.dataWrap = |
  noRowsStdWrap.wrap =
  oneImageStdWrap.dataWrap = |
  imgTagStdWrap.wrap = |
  editIconsStdWrap.wrap = |
  caption.wrap = |
}
# Set this as active rendering method
tt_content.image.20.renderMethod = noWraps

.

如何对任何内容元素执行此操作

  1. 在 Typo3 中使用模板视图
  2. 转到包含模板的页面
  3. 编辑您的模板
  4. 选择顶部的Typoscript-Object-Browser(而不是Info/Edit
  5. 使用搜索表单查找换行,例如“csc-textpic”
  6. 确定要删除的包装或模板
  7. >在您的 Typoscript 代码中覆盖或删除它们
于 2015-07-23T10:36:16.937 回答