Custom html.tpl.php file is not getting picked up

27/06/2018


I have a page with a url alias of say /food/tacos

I have created html–food–tacos.tpl.php to include some javascript only on that page. I’ve used this method many times (on other sites) with no problems, but Drupal (7) doesn’t seem to be picking it up this time.

I have cleared all caches.

Theme debug offers the following suggestions, none of which seem to recognize the path alias. I would prefer to use the alias as I may use this theme in multiple places where the node number would not be the same.

<!-- THEME DEBUG -->
<!-- CALL: theme('html') -->
<!-- FILE NAME SUGGESTIONS:
   * html--node--3.tpl.php
   * html--node--%.tpl.php
   * html--node.tpl.php
   x html.tpl.php
-->
<!-- BEGIN OUTPUT from 'sites/all/themes/mytheme/html.tpl.php' -->

How can I get this working with the alias?

قالب وردپرس