[support] Avoid sub-theme

Chris Miller cjm at tryx.org
Wed Nov 20 18:02:47 UTC 2013


Hi Folks, 

I've added JavaScript/AJAX to a node display which is managed by Display Suite. Consequently, I've added: 

drupal_add_library('system', 'drupal.ajax'); 
drupal_add_js(drupal_get_path('module', 'music_display') . '/music_display.js'); 

to ds-2col-fluid--node-music.tpl.php This works well because the JavaScript is only loaded for this content-type, but it only works because I sub-themed Bartik on this development site. On the production site, I don't know what theme the designers will use, so I want to move these two line to a module. 

How do I create the same qualification, meaning make the above two calls only in the case where Drupal, in the guise of Display Suite, is displaying the "Music" node? 

Chris. 
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.drupal.org/pipermail/support/attachments/20131120/1749b21b/attachment.html 


More information about the support mailing list