dreamer2014520 2015-02-20 21:58 采纳率: 0%
浏览 82
已采纳

我的内容类型的自定义模板在Drupal 7 - Bootstrap主题中不起作用

I am using bootstrap theme on Drupal 7. My subtheme has some templates that have overwritten certain pages.

I am trying to make a template specifically for one of my content types:

Spokesmodel Page (Machine name: spokesmodel_page)

I have a template named page--spokesmodel_page.tpl.php but for some reason it's not showing up. I've cleared the cache and written a line of code for testing to see if it works but it's getting the template from page.tpl.php

Is there something else I need to do for this to work or should it automatically start working? I've made templates for certain nodes and they work fine.

  • 写回答

2条回答 默认 最新

  • dsh102123 2015-02-21 01:16
    关注

    Try copying node.tpl.php from the parent theme into the child theme and re-naming that according to naming conventions here https://www.drupal.org/node/1089656

    i.e. node--spokesmodel.tpl.php

    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论
查看更多回答(1条)

报告相同问题?