Drupal 7- TPL personalizado para login y register

/* CÓDIGO PARA EL TEMPLATE.PHP DEL TEMA*/ /*Establece tpl para pagina de login y de register*/ function saniyou_theme() { $items = array(); // create custom user-login.tpl.php $items['user_login'] = array( 'render element' => 'form', 'path' => drupal_get_path('theme', 'saniyou') . '/templates', 'template' => 'user-login', //DENTRO DE LA CARPETA TEMPLATES DEL TEMA SE CREA user-login.tpl.php 'preprocess functions' => array( 'saniyou_preprocess_user_login' ), ); $items['user_register_form'] = array( 'render element' => 'form', 'path' => drupal_get_path('theme', 'saniyou') . '/templates', 'template' => 'user-register-form', //DENTRO DE LA CARPETA TEMPLATES DEL TEMA SE CREA user-register-form.tpl.php 'preprocess functions' => array( 'saniyou_preprocess_user_register_form' ), ); return $items; } /*CÓDIGO BÁSICO PARA LOS NUEVOS TPL*/ <?php render($page['content']['metatags']); ?> <?php print drupal_render_children($form) ?> //RENDERIZA EL FORMULARIO

Be the first to comment

You can use [html][/html], [css][/css], [php][/php] and more to embed the code. Urls are automatically hyperlinked. Line breaks and paragraphs are automatically generated.