Drupal 7 사이트가 있습니다. 사용자 정의 컨텐츠 유형 제품이 있습니다. 20 개의 필드가 있습니다. 이 콘텐츠 유형에 대한 추가 / 편집 양식의 UI를 제어하고 싶습니다.
사이트 / 모든 / 모듈 아래에 모듈을 만들었습니다.
-admin_product.module
<?php
function admin_product_theme($existing, $type, $theme, $path){
return array(
'product_node_form' => array(
'arguments' => array(
'form' => NULL,
),
'path' => drupal_get_path('theme', 'myTheme').'/templates/forms',
'template' => 'product-node-form',
'render element' => 'form',
)
);
}
템플릿-sites / all / themes / myTheme / templates / forms / product-node-form.tpl.php
-product-node-form.tpl.php
<?php
echo drupal_render_children($form);
echo 'hello template'; // just to test
?>
템플릿이 렌더링되지 않습니다.
양식의 UI를 어떻게 제어합니까?
어떤 도움이라도 대단히 감사합니다.
이 기사는 인터넷에서 수집됩니다. 재 인쇄 할 때 출처를 알려주십시오.
침해가 발생한 경우 연락 주시기 바랍니다[email protected] 삭제
몇 마디 만하겠습니다