欢迎各位兄弟 发布技术文章

这里的技术是共享的

You are here

请问quick tabs的样式改怎么覆写

shiping1 的头像

请问quick tabs的样式改怎么覆写

赞成!
0
否决!

如题,覆写quick tab是block吗?

命名规则又是怎样的

 

2 个回答

赞成!
0
否决!

在modules\quicktabs\tabstyles 是quicktabs 的样式。你可以拷贝一份改名成另外一个风格。

如果你要正规点的做法,就建议新建一个模块,并调用quicktabs 的函数

1
2
3
4
5
6
7
8
9
10
11
12
function MODULE_quicktabs_tabstyles() {
  $tabstyles_directory = drupal_get_path('module', 'MODULE') . '/tabstyles';
  $files = file_scan_directory($tabstyles_directory, '/\.css$/');
  $tabstyles = array();
  foreach ($files as $file) {
    // Skip RTL files.
    if (!strpos($file->name, '-rtl')) {
      $tabstyles[$file->uri] = drupal_ucfirst($file->name);
    }
  }
  return $tabstyles;
}

然后你可以以下面的结构做样式

1
2
3
4
5
6
7
8
MODULE_ROOT
    +--- tabstyles
        +- foostyle
            +- foobar.css
            +- foobar-rtl.css
        +- barstyle
            +- bar-style.css
            +- bar-style-rtl.css

就这样。非常简单。

 
赞成!
0
否决!

很多主题都对quicktabs和superfish的样式进行了重写,可以研究一下



来自 http://www.drupalla.com/node/2180
普通分类: