Drupal 主题:Omega drupal .info 文件?

发布于 2024-10-04 14:21:18 字数 4922 浏览 3 评论 0原文

我正在使用 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"

I'm using an Omega child theme. I've renamed and renamed all the functions. I'm a bit of a newbie at drupal but a very experienced wordpress user. I'm a bit frustrated by the theme configurations.

I'm trying to use the .info file to override the columns and the layout. Whenever i change the number of columns it doesn't actually render the columns. I've cleared the cache as well. Unfortunately, the settings i've set in the Administration-> Theme -> Theme Configurations Page Override my .info file.

Any ideas?

The following is my .info file for my theme
; $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"

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

醉城メ夜风 2024-10-11 14:21:18

这可能是因为您的 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

It's probably because of this code in your theme-settings.php file:

  // 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);
  }

and the fact that you've saved your settings on the admin/build/themes/settings/omega page.

You'll probably have to delete the relevant settings from the variables table in your database in order for the settings in the .info file to take affect.

I did a little more research into this after posting the above and found the following issue, which offers a better fix for your problem: http://drupal.org/node/795180

擦肩而过的背影 2024-10-11 14:21:18

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

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

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

谢谢@oadaeh!

Solved. The issue was that you have to reset the default theme values.

This can be accomplished by visiting configuring your own theme:

  1. /admin/build/themes/settings/
  2. Clear the database settings for your theme by clicking "Reset to Defaults"

Thanks @oadaeh !

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文