This question is specific to D7:
I'm trying to load in jQuery UI modal into the theme. I've put the following in my
$variables['page']['content']['#attached']['library'] = array('system', 'ui.dialog');
This isn't loading the library at all.
Direct link: http://i.imgur.com/iTeynMR.png
Obviously all caches were cleared. At this point the console shows an error that
dialog is not defined. But as soon as I add this (in the same function, just below the
then the dialog modal opens and starts playing nicely. Am I doing something wrong with #attached? I'm really puzzled as to why one's working and the other doesn't. Ideally I'd like to use
#attached in the cases where the variables array gets cached and the preprocess doesn't get called.