0
我正在使用Drupal 7.我试图创建一个媒体滑块与图像和Vimeo视频。为此,我创建了一个内容类型,其中一个字段用于图像,一个字段用于Vimeo链接。我已将字段设置为无限制。为图像滑块drupal7中的视图字段自定义html
我在查看页面中显示我的内容。问题是Drupal为不同的fild类型创建了两个不同的包装器。所有图像都用一个div包裹,视频用另一个div包裹。
但我想有一个包装evererything和一个包装每个项目。 例如:
<div class="slider">
<div class="item">
<img typeof="foaf:Image" src="image.jpg" width="658" height="420" alt="">
</div>
<div class="item">
<img typeof="foaf:Image" src="image2.jpg" width="658" height="420" alt="">
</div>
<div class="item">
<iframe title="Video title" src="http://myVideoLink?color=cccccc" frameborder="0" width="658" height="420" id="vimeo-player"></iframe>
</div>
<div class="item">
<iframe title="Video title" src="http://myVideoLink2?color=cccccc" frameborder="0" width="658" height="420" id="vimeo-player"></iframe>
</div>
</div>
取而代之的是:
<div class="views-field views-field-field-image">
<div class="field-content">
<span thmr="thmr_3">
<span thmr="thmr_4">
<span thmr="thmr_5">
<img typeof="foaf:Image" src="image.jpg" width="658" height="420" alt="">
</span>
</span>
</span>
,
<span thmr="thmr_6">
<span thmr="thmr_7">
<img typeof="foaf:Image" src="image2.jpg" width="658" height="420" alt="">
</span>
</span>
</div>
</div>
<div class="views-field views-field-field-vimeo">
<div class="field-content">
<span thmr="thmr_10">
<iframe title="Video title" src="http://myVideoLink?color=cccccc" frameborder="0" width="658" height="420" id="vimeo-player"></iframe>
,
<iframe title="Video title" src="http://myVideoLink2?color=cccccc" frameborder="0" width="658" height="420" id="vimeo-player"></iframe>
</div>
</div>
谢谢你的帮助!它帮助我去除一些额外的html元素。我的问题还在于Devel模块为我的代码添加了额外的span标签。 – user1149117