Skip to content

Instantly share code, notes, and snippets.

@tarto-dev
Last active August 29, 2015 14:06
Show Gist options
  • Select an option

  • Save tarto-dev/b6102cfbd467cb158b8c to your computer and use it in GitHub Desktop.

Select an option

Save tarto-dev/b6102cfbd467cb158b8c to your computer and use it in GitHub Desktop.
<?php
function yourtheme_theme() {
$items = array();
$items['user_login'] = array(
'render element' => 'form',
'path' => drupal_get_path('theme', 'yourtheme') . '/templates',
'template' => 'user-login',
'preprocess functions' => array(
'yourtheme_preprocess_user_login'
),
);
$items['user_register_form'] = array(
'render element' => 'form',
'path' => drupal_get_path('theme', 'yourtheme') . '/templates',
'template' => 'user-register-form',
'preprocess functions' => array(
'yourtheme_preprocess_user_register_form'
),
);
$items['user_pass'] = array(
'render element' => 'form',
'path' => drupal_get_path('theme', 'yourtheme') . '/templates',
'template' => 'user-pass',
'preprocess functions' => array(
'yourtheme_preprocess_user_pass'
),
);
return $items;
}
/* USELESS, c'est au cas où tu as besoin d'overrider les page-titles ;) */
function yourtheme_preprocess_user_login(&$vars) {
$vars['intro_text'] = t('This is my awesome login form');
}
function yourtheme_preprocess_user_register_form(&$vars) {
$vars['intro_text'] = t('This is my super awesome reg form');
}
function yourtheme_preprocess_user_pass(&$vars) {
$vars['intro_text'] = t('This is my super awesome request new password form');
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment