I have cloned the User Profile panel and would like to use advanced_profile.css with it. I tried adding <style type="text/css" media="print">@import "<?php print base_path() .drupal_get_path('module', 'advanced_profile') ?>/advprofile/advanced_profile.css";</style> to page.tpl.php. It adds the file, however no styling is applied to #user-profile .panel-pane h2.title.

Any tips on how to use APK styling on other panels?

Comments

michelle’s picture

Status: Active » Fixed

This is the code for it:

    if (arg(0) == 'user') {
      // Find the CSS file for the profiles by looking first in the theme 
      // and then in the module.
      $css_file = path_to_theme() . '/advanced_profile.css';
      
      if (!file_exists($css_file)) {
        $css_file = drupal_get_path('module', 'advanced_profile') . '/advprofile/advanced_profile.css';
      }

      drupal_add_css($css_file);
    }
  }

Just put that in your template.php and change the first if() to match the pages you want it on.

Michelle

Anonymous’s picture

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for two weeks with no activity.