[РЕШЕНО] Как совместить 2 функции

Главные вкладки

Аватар пользователя Heihachi88 Heihachi88 12 января 2011 в 19:37

Помогите пожалуйста совместить 2 функции в одну в template.php, ибо по отдельности они не хотят работать. Одна функция позволяте темизировать форму логина, а другая форму регистрации:

<?php
function mytheme_theme(){
  return array(
    
'user_login_block' => array(
      
'template' => 'user-login-block',
      
'arguments' => array('form' => NULL),
    )
  );
}

function 

mytheme_theme(){
  return array(
    
'user_register' => array(
    
'arguments' => array('form' => NULL),
    
'template' => 'user-register'// this is the name of the template
    
)
  );
}
?>

Комментарии

Аватар пользователя vitg vitg 12 января 2011 в 20:13

Примерно так:

<?php
function mytheme_theme(){
  return array(
    'user_login_block' => array(
      'template' => 'user-login-block',
      'arguments' => array('form' => NULL),
    ),
    'user_register' => array(
      'arguments' => array('form' => NULL),
      'template' => 'user-register', // this is the name of the template
    )
  );
}
}
?>
Аватар пользователя Heihachi88 Heihachi88 12 января 2011 в 20:30

Аригатоу гозаймаз, все работает Smile

<?php
function betpebet_theme(){
  return array(
    
'user_login_block' => array(
      
'template' => 'user-login-block',
      
'arguments' => array('form' => NULL),
    ),
    
'user_register' => array(
      
'arguments' => array('form' => NULL),
      
'template' => 'user-register'// this is the name of the template
    
)
  );
}
?>