
In Drupal core the function drupal_add_css() help us to achieve adding CSS for a specific pages. The CTools modal popup will not support core drupal_add_css() functions. We have to use CTools functions for adding CSS files to modal window. The function ctools_add_css() will help to adding CSS files into modal popup windows. The function accepts filename, Module name and path for adding the CSS file.
Syntax:
Example:
Path: test_module1 -- test_module1.module -- css -- test_module1.css ctools_add_css('test_module1', 'test_module1', 'css'); Path: test_angular -- test_angular.module -- js -- test_angular.css -- lib -- angular.css ctools_add_css('test_angular', 'test_angular', 'css'); // Adding CSS file. ctools_add_css('angular', 'test_angular', 'css/lib'); // Adding Angular CSS file.
Similar Post:
Drupal 7: CTools adding JS to Modal window with example[ctools_add_js()]
Category: