简体   繁体   English

Drupal 7中未识别字段模板

[英]Field template not being recogized in Drupal 7

Im new to Drupal and am using the Omega theme, so I read these instructions to override a field template for a body field in content type article 我是Drupal的新手,正在使用Omega主题,因此我阅读了这些说明,以覆盖内容类型article body字段的字段模板

I placed the following file in my sub theme 我将以下文件放在子主题中

field--field_body--article.tpl.php 字段--field_body--article.tpl.php

I also tried... 我也尝试过...

field--body--article.tpl.php 字段-身体--article.tpl.php

field--body.tpl.php 字段--body.tpl.php

I just have an empty file for now so I figured perhaps that it will make the body fields empty throughout the site but nothing is happening 我现在只有一个空文件,所以我想也许它将使正文字段在整个网站中都是空的,但没有任何反应

I also flushed my cache. 我还刷新了缓存。

Just change underscore with a dash between field and body. 只需在下划线和下划线之间更改下划线即可。

field--field-body--article.tpl.php 场-场主体--article.tpl.php

And don't forget to flush cache again :) 并且不要忘记再次刷新缓存:)

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM