2013-02-16 81 views
-1

當我管理字段(主頁»管理»結構»內容類型»文章»管理字段)時,更改字段的種類。如何改變字段的順序?

在數據庫中,哪裏存儲字段的權重?

回答

1

重量位於「field_config_instance」表的「數據」列中。請注意,數據列存儲一個序列化數組。作爲一個例子,這裏是我的數據庫中的一個字段的數據列。我用粗體突出了重量字段。您會注意到,每個查看模式也有相應的權重,顯示在「管理顯示」頁面上。

a: 6: { 
    s: 5: "label"; 
    s: 7: "Address"; 
    s: 8: "required"; 
    b: 1; 
    s: 6: "widget"; 
    a: 4: { 
     s: 4: "type"; 
     s: 21: "addressfield_standard"; 
     s: 6: * * "weight"; 
     i: -10 * * ; 
     s: 8: "settings"; 
     a: 2: { 
      s: 15: "format_handlers"; 
      a: 2: { 
       i: 0; 
       s: 7: "address"; 
       i: 1; 
       s: 12: "name-oneline"; 
      } 
      s: 19: "available_countries"; 
      a: 0: {} 
     } 
     s: 6: "module"; 
     s: 12: "addressfield"; 
    } 
    s: 7: "display"; 
    a: 3: { 
     s: 7: "default"; 
     a: 5: { 
      s: 5: "label"; 
      s: 6: "hidden"; 
      s: 4: "type"; 
      s: 20: "addressfield_default"; 
      s: 6: "weight"; 
      i: -10; 
      s: 8: "settings"; 
      a: 2: { 
       s: 19: "use_widget_handlers"; 
       i: 1; 
       s: 15: "format_handlers"; 
       a: 1: { 
        i: 0; 
        s: 7: "address"; 
       } 
      } 
      s: 6: "module"; 
      s: 12: "addressfield"; 
     } 
     s: 8: "customer"; 
     a: 5: { 
      s: 5: "label"; 
      s: 6: "hidden"; 
      s: 4: "type"; 
      s: 20: "addressfield_default"; 
      s: 6: "weight"; 
      i: -10; 
      s: 8: "settings"; 
      a: 2: { 
       s: 19: "use_widget_handlers"; 
       i: 1; 
       s: 15: "format_handlers"; 
       a: 1: { 
        i: 0; 
        s: 7: "address"; 
       } 
      } 
      s: 6: "module"; 
      s: 12: "addressfield"; 
     } 
     s: 13: "administrator"; 
     a: 5: { 
      s: 5: "label"; 
      s: 6: "hidden"; 
      s: 4: "type"; 
      s: 20: "addressfield_default"; 
      s: 6: "weight"; 
      i: -10; 
      s: 8: "settings"; 
      a: 2: { 
       s: 19: "use_widget_handlers"; 
       i: 1; 
       s: 15: "format_handlers"; 
       a: 1: { 
        i: 0; 
        s: 7: "address"; 
       } 
      } 
      s: 6: "module"; 
      s: 12: "addressfield"; 
     } 
    } 
    s: 8: "settings"; 
    a: 1: { 
     s: 18: "user_register_form"; 
     b: 0; 
    } 
    s: 11: "description"; 
    s: 0: ""; 
} 

Neerav梅塔

Drupal Developer

+0

疑難雜症,THKS! – ActHtml 2013-02-17 03:44:17