如何删除typo3中的图像周围的div? [英] How to remove div around an image in typo3?

查看:130
本文介绍了如何删除typo3中的图像周围的div?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

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

I added an image in typo3. It showed up with extra div in page.

  <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="">  

没有额外的包装。

I可以做这样的事情来消除内容中的额外wapper。

I can do something like this for removing extra wapper around content.

tt_content.stdWrap.innerWrap >

如何为图片添加图片?

How to do it for image?

推荐答案

关于您的具体问题



以下代码应该删除图片的所有内容。请记住,这也会消除定位和浮动功能。

Regarding your specific question

The following code should remove all wraps around the image. Keep in mind that this also removes the positioning and floating abilities.

# 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中的 Template 视图
  2. 使用您的模板转到页面
  3. 编辑您的模板

  4. 选择顶部的 Typoscript-Object-Browser (而不是 Info / Edit
  5. 使用搜索表单来查找换行,例如csc-textpic

  6. 识别您要删除的包裹或模板

  7. 覆盖或删除> 您的Typoscript代码

  1. Use the Template view in Typo3
  2. Go to the page with your template
  3. Edit your template
  4. Select the Typoscript-Object-Browser at the top (instead of Info/Edit)
  5. Use the search form to find a wrap, e.g. "csc-textpic"
  6. Identify the wraps or templates that you want to remove
  7. Overwrite or delete > them in you Typoscript code

这篇关于如何删除typo3中的图像周围的div?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆