Drupal Theming:Omega drupal .info文件?

时间:2010-11-24 16:59:46

标签: drupal themes drupal-theming

我正在使用Omega儿童主题。我已重命名并重命名了所有功能。我是drupal的新手,但是非常有经验的wordpress用户。我对主题配置感到有点沮丧。

我正在尝试使用.info文件来覆盖列和布局。每当我更改列数时,它实际上不会呈现列。我也清除了缓存。不幸的是,我在管理中设置的设置 - >主题 - >主题配置页面覆盖我的.info文件。

有什么想法吗?

以下是我主题的.info文件     ; $ Id:childtheme.info,v 1.1.2.15

; ------- Declare default theme information

name        = Child Theme
description = Child Theme built by <a href="http://www.globerunnerseo.com">Globe Runner SEO</a>
screenshot = screenshot.png
core       = 6.x
base theme = omega

; ------- Declare default stylesheets

stylesheets[all][] = assets/css/common.css
stylesheets[all][] = assets/css/custom.css

; ------- Declare default javascript includes

scripts[] = assets/js/core.js

; ------- Declare default theme regions

regions[sidebar_first] = sidebar first
regions[sidebar_last] = sidebar last

regions[header_nav] = header nav
;regions[header_last] = header last

regions[preface_first] = preface first
regions[preface_middle] = preface middle
regions[preface_last] = preface last

regions[content_top] = content top
regions[content_bottom] = content bottom

regions[postscript_one] = postscript 1
regions[postscript_two] = postscript 2
regions[postscript_three] = postscript 3
regions[postscript_four] = postscript 4

regions[footer_first] = footer first
regions[footer_last] = footer last
regions[meta_first] = meta first
regions[meta_last] = meta last

; ------- Declare default theme features

features[] = logo
features[] = name
features[] = slogan
features[] = mission
features[] = node_user_picture
features[] = comment_user_picture
features[] = search
features[] = favicon
features[] = primary_links
features[] = secondary_links

; ------- Set the default settings to be used in theme-settings.php

; ------- Non-960gs general settings
settings[reset_css] = 1
settings[text_css] = 1
settings[regions_css] = 1
settings[defaults_css] = 1
settings[custom_css] = 1

settings[front_page_title_display] = title_slogan
settings[page_title_display_custom] = ''
settings[other_page_title_display] = ptitle_stitle
settings[other_page_title_display_custom] = ''
settings[configurable_separator] = ' | '

settings[omega_breadcrumb] = 'yes'
settings[omega_breadcrumb_separator] = ' / '
settings[omega_breadcrumb_home] = 1
settings[omega_breadcrumb_trailing] = 1
settings[omega_breadcrumb_title] = 1

settings[mission_statement_pages] = home

settings[sidebar_combine] = 1
settings[sidebar_contain_pages] = ''

; ------- / Non-960gs general settings

; ------- 960gs default region settings

; ------- default_container_width applies to regions like $help, $messages
settings[omega_default_container_width] = 24

; ------- Region settings for top zone (logo, menus)

settings[omega_branding_wrapper_width] = 24
settings[omega_header_logo_width] = 4
settings[omega_header_menu_width] = 12

; ------- Region settings for header regions

settings[omega_header_wrapper_width] = 24
settings[omega_header_nav_width] = 24
;settings[omega_header_last_width] = 8

; ------- Region settings for default breadcrumb and search box placement

settings[omega_internal_nav_wrapper_width] = 24
settings[omega_breadcrumb_slogan_width] = 10
settings[omega_search_width] = 6

; ------- Region settings for preface regions

;settings[txi_preface_wrapper_grids] = 24
;settings[omega_preface_first_width] = 12
;settings[omega_preface_first_prefix] = 0
;settings[omega_preface_first_suffix] = 0
;settings[omega_preface_middle_width] = 12
;settings[omega_preface_middle_prefix] = 0
;settings[omega_preface_middle_suffix] = 0
;settings[omega_preface_last_width] = 0
;settings[omega_preface_last_prefix] = 0
;settings[omega_preface_last_suffix] = 0

; ------- Region settings for content regions

settings[omega_content_layout] = first_content_last
settings[omega_content_container_width] = 24
settings[omega_sidebar_first_width] = 6
settings[omega_content_main_width] = 17
settings[omega_sidebar_last_width] = 0

; ------- Region settings for postscript regions

settings[omega_postscript_container_width] = 24 
settings[omega_postscript_one_width] = 12
settings[omega_postscript_one_prefix] = 0
settings[omega_postscript_one_suffix] = 0
settings[omega_postscript_two_width] = 6
settings[omega_postscript_two_prefix] = 0
settings[omega_postscript_two_suffix] = 0
settings[omega_postscript_three_width] = 4
settings[omega_postscript_three_prefix] = 0
settings[omega_postscript_three_suffix] = 0
settings[omega_postscript_four_width] = 4
settings[omega_postscript_four_prefix] = 0
settings[omega_postscript_four_suffix] = 0

; ------- Region settings for footer regions

settings[omega_footer_container_width] = 24
settings[omega_footer_first_width] = 5
settings[omega_footer_last_width] = 19

; ------- / 960gs default region settings

; Information added by drupal.org packaging script on 2010-07-22
version = "6.x-1.0-beta11"
core = "6.x"
project = "omega"
datestamp = "1279809608"

2 个答案:

答案 0 :(得分:1)

这可能是因为你的theme-settings.php文件中的代码:

  // Get the default values from the .info file.
  if (count($subtheme_defaults) > 0) {
    // Allow a subtheme to override the default values.
    $settings = array_merge($subtheme_defaults, $saved_settings);
  }
  else {
    // Merge the saved variables and their default values.
    $defaults = omega_theme_get_default_settings('omega');
    $settings = array_merge($defaults, $saved_settings);
  }

以及您已在admin / build / themes / settings / omega页面上保存设置的事实。

您可能必须从数据库中的变量表中删除相关设置,才能使.info文件中的设置生效。

在发布上述内容后,我对此进行了一些研究,发现了以下问题,为您的问题提供了更好的解决方法:http://drupal.org/node/795180

答案 1 :(得分:1)

解决。问题是您必须重置默认主题值。

这可以通过访问配置您自己的主题来完成:

  1. / admin / build / themes / settings /
  2. 点击“重置为默认值”
  3. ,清除主题的数据库设置

    谢谢@oadaeh!