테마의 template.php 또는 사용자 정의 모듈에서 컨텐츠 유형 양식을 사용자 정의 할 수 있습니다. 이 문서는 here에 설명되어 있습니다. 사용자 지정 콘텐츠 형식을 기사를 사용하여 테마 인 MyModule에서 사용자 지정 모듈이있는 경우 예를 들어, 당신은과 같이 사용자 정의 할 수 있습니다 출력하려면
<?php
/**
* Implements hook_theme().
*/
function MYMODULE_theme($existing, $type, $theme, $path) {
return array(
'article_node_form' => array(
'render element' => 'form',
'template' => 'article-node-form',
// this will set to module/theme path by default:
'path' => drupal_get_path('module', 'MYMODULE'),
),
);
}
?>
사용자 정의 데이터 :
<?php
/**
* Preprocessor for theme('article_node_form').
*/
function template_preprocess_article_node_form(&$variables) {
// nodeformcols is an alternative for this solution.
if (!module_exists('nodeformcols')) {
$variables['sidebar'] = array(); // Put taxonomy fields in sidebar.
$variables['sidebar'][] = $variables['form']['field_tags'];
hide($variables['form']['field_tags']);
// Extract the form buttons, and put them in independent variable.
$variables['buttons'] = $variables['form']['actions'];
hide($variables['form']['actions']);
}
}
?>
콘텐츠 유형별로 노드를 테마 화하는 방법에 대한 정보는 https://drupal.org/node/17565를 참조하십시오. –
확실히 보이지 않는 제목 외에 각 그룹에 다른 제목을 추가하거나 보이지 않는 제목을 보시겠습니까? 두 번째 부분 인 경우 @nmc 응답 및 템플릿 파일에 동의합니다. – Djouuuuh
감사합니다 @ justinelejeune하지만 각 그룹에 제목을 어떻게 추가합니까? 나는 그 옵션을 보지 못했다 ... 사용자가 내용을 추가 할 수있는 필드. – Cybercampbell