DRUPAL 7 - Crear tpl para formulario de login y registro

/*ESTE CODIGO SE INCLUIRÍA EN EL TEMPLATE.PHP DEL TEMA*/ /*Establece tpl para pagina de login*/ 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', // Habria que crear una tpl dento de la carpeta templates del tema llamado 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', // Habria que crear una tpl dento de la carpeta templates del tema llamado user-register-form.tpl.php 'preprocess functions' => array( 'saniyou_preprocess_user_register_form' ), ); return $items; } /*EL CODIGO BÁSICO PARA RENDERIZAR TODO EL FORMULARIO DE LOGIN O DE REGISTRO DENTRO DEL TPL SERÍA EL SIGUIENTE: <?php render($page['content']['metatags']); ?> <?php print drupal_render_children($form) ?> */

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.