1
我是新來的Drupal主題,並試圖爲我具有的特定內容類型創建自定義主題模板。Drupal render()強制其他div關閉?
我試圖如下:
<div<?php print $content_attributes; ?>>
<?php print render($content['field_property_media']); ?>
<div class="field-label-above property-information">
<div class="field-label">Property Information</div>
<?php print render($content['address']); ?>
</div>
</div>
然而,當內容實際呈現的地址部分被趕出其父DIV的,看起來像這樣:
<div class="field-label-above property-information">
<div class="field-label">Property Information</div>
</div>
<div class="field field-name-field-property-address field-type-addressfield field-label-inline clearfix"><div class="field-label">Address: </div><div class="field-items"><div class="field-item even"><div class="street-block"><div class="thoroughfare">55 Duchess Ave</div></div><div class="addressfield-container-inline locality-block"><span class="locality">London</span> <span class="state">Ontario</span> <span class="postal-code">N6C 1N3</span></div><span class="country">Canada</span></div></div></div>
我不能弄清楚爲什麼會發生這種情況,或者解決方案是如何將地址保留在我手動創建的div內。
想法?
實際上,我看到這也和我沒有什麼事,那就是改變節點輸出,我可以找到。只是爲了幫助指出,這個問題在其他地方經歷過,並不一定是古怪的。 –