0
커스텀 포맷터 (Drupal, CCK)를 사용하여 필드를 만들었습니다.
지금 나는 CCK의 모듈로 추가하려고사용자 정의 포맷터에서 필드로?
/**
* Implements hook_theme().
*/
function product_attribute_theme() {
return array(
'product_attribute_formatter_product_attribute' => array(
'arguments' => array('element' => NULL),
),
);
}
/**
* Implements hook_field_formatter_info().
*/
function product_attribute_field_formatter_info() {
return array(
'product_attribute' => array(
'label' => 'Product Attribute',
'description' => t('an Attribute of a Product'),
'field types' => array('content_taxonomy', 'text'),
'multiple values' => CONTENT_HANDLE_MODULE,
),
);
}
function theme_product_attribute_formatter_product_attribute($element) {
return ($element['#item']['value']);
}
를 내보내려면이 PHP 코드를 가지고 있지만 난 그렇게 어떻게해야합니까, 필드에 추가하지 않았다?