Drupal 7 を使用しています。画像と Vimeo ビデオを含むメディア スライダーを作成しようとしています。そのために、画像用の 1 つのフィールドと Vimeo リンク用の 1 つのフィールドを持つコンテンツ タイプを作成しました。フィールドを無制限に設定しました。
ビュー ページにコンテンツを表示しています。問題は、Drupal が異なるフィールド タイプに対して 2 つの異なるラッパーを作成することです。すべての画像は 1 つの div でラップされ、ビデオは別の div でラップされます。
しかし、すべてのアイテムに 1 つのラッパーと、各アイテムに 1 つのラッパーが必要です。例えば:
<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>