D6에서이 작업을 수행하는 방법에 대한 수많은 자습서를 찾았습니다. 찾은 예제 코드는 오메가 하위 분류에서 작동하지 않습니다. Here's 코드 I've 오메가 하위 테마가있는 Drupal 6의 테마 사용자 등록 페이지
은 나에게 맞는 발견 ( via Trellon) 최고 :template.tpl.php 내부 :
<?php
function themename_theme($existing, $type, $theme, $path) {
return array(
...
// tell Drupal what template to use for the user register form
'user_register' => array(
'arguments' => array('form' => NULL),
'template' => 'user-register', // this is the name of the template
),
...
);
}
?>
그리고 사용자 register.tpl을 here's. PHP 양식 :
<div id="registration_form">
<div class="field">
<?php
print drupal_render($form['account']['name']); // prints the username field
?>
</div>
<div class="field">
<?php
print drupal_render($form['account']['pass']); // print the password field
?>
</div>
<div class="field">
<?php
print drupal_render($form['submit']); // print the submit button
?>
</div>
</div>
</div>
것은 내 template.tpl.php 파일 내부에 I've 이미 mytheme_theme 선언이다, 그래서 나는 새로운 코드를 추가하는 방법을 알고하지는. 내 오메가 subtheme 폴더 내부
: 사실
/**
* Implementation of HOOK_theme().
*/
function lcph_theme(&$existing, $type, $theme, $path) {
$hooks = omega_theme($existing, $type, $theme, $path);
// Add your theme hooks like this:
/*
$hooks['hook_name_here'] = array(// Details go here);
*/
// @TODO: Needs detailed comments. Patches welcome!
return $hooks;
}
, 난 그냥/내 템플릿 파일 내부 코드를 붙여 복사 할 경우,이 I've가있어 오류입니다 :
Fatal error: Cannot redeclare lcph_theme() (previously declared in /sites/all/themes/lcph/template.php:22) in /sites/all/themes/lcph/template.php on line 125
방법은 내 오메가 하위 주제 템플릿에 예제 코드를 추가 할 수 있습니까? 지도와 도움에 감사드립니다. 당신이 다음을 수정 ... 당신이 다음 그것을 발견하지 않은 경우가 발견되면 당신이 omega_theme() 함수에 대한 귀하의 template.php 파일에서 검색되지 않는
는 Rosamunda는