开发者

Drupal 7 Template Suggestions

I think in Drupal 6- I needed to add the suggestion of 'node-NID' to the list of template files that were candidates for a node with an nid of 10. Supposedly this is already done in Drupal 7 and indeed I see 'node__10' in my node's theme_hook_suggestions. This should translate to 'node--10.tpl.php', but with that file in place (/sites/all/themes/mytheme/templates/node--10.tpl.php) I don't see the content in that file.

I开发者_如何学运维've also tried node-10.tpl.php, page-node-10.tpl.php with varying numbers of hyphens to no avail.

What am I doing wrong?


Try putting node--10.tpl.php in /sites/all/themes/mytheme instead of in the templates folder and be sure to clear the cache (admin/settings/performance) to allow Drupal to see the template override.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜