in my site I have update DS to the last versione 7.x-2.7 and now theme-hook_suggestions does not works. Drupal is update to the last version, too.

I, via mytheme_preprocess_node() function, insert some hook_suggestions for my node, based on node type and a field value.

Via devel themer I can see this:

Candidate template files: ds-1col--node-article-full.tpl.php < ds-1col--node-article.tpl.php < ds-1col--node-full.tpl.php < ds-1col--node.tpl.php < ds-1col.tpl.php

theme_hook_suggestions (Array, 9 elements)
0 (String, 13 characters ) node__article
1 (String, 11 characters ) node__59325
2 (String, 31 characters ) ds_1col__node_article_cartoline
3 (String, 31 characters ) ds_1col__node_article_cartoline
4 (String, 7 characters ) ds_1col
5 (String, 13 characters ) ds_1col__node
6 (String, 18 characters ) ds_1col__node_full
7 (String, 21 characters ) ds_1col__node_article
8 (String, 26 characters ) ds_1col__node_article_full

Note that element nr 2 is my suggestion, so my function is correct. (items 2 and 3 are identical because I have tried to insert the same template function code in a module function code to see if there was some type of problem with my templates).

Why my file (ds_1col__node_article_cartoline -> ds-1col--node-article-cartoline.tpl.php) in my "templates" directory in my theme is not used ? If I write a simple ds-1col.tpl.php in my "templates" directory file this file is used.

I have tried to change one of my module "weight" from 0 to 2 or from 0 to -1 (ds weight is 1) but without luck.

Where is the problem ?


1 Answer 1


I have 3 suggestions:

  1. Might just be a typo on your behalf but the tpl file should be ds-1col--node-article-cartoline.tpl.php rather than ds-1col--node-article-immagini.tpl.php
  2. Could it be that because you've specified ds_1col it's being affected by display suite's naming convention, try using your theme name instead.
  3. There is some sort of inheritance that can be hard to spot, for example to override node--article.tpl.php you need node.tpl.php present in your theme
  • Hi, before the update all was fully functional. 1) sorry for the typo (I have correct my question): ds_1col__node_article_cartoline -> ds-1col--node-article-cartoline.tpl.php 2) I don't think. 3) node.tpl.php is present.
    – ZioBudda
    Apr 7, 2015 at 10:15
  • Well you need to account for all possibilities. If you disable Display Suite does your suggestion work? Apr 7, 2015 at 10:35
  • Also did you update from 7.x-2.6 to 7.x-2.7 or did you have an older version installed. Have you checked the release notes for any issues which might be relevant? Apr 7, 2015 at 10:37

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.