drupal 覆写登录框
生活随笔
收集整理的這篇文章主要介紹了
drupal 覆写登录框
小編覺得挺不錯的,現在分享給大家,幫大家做個參考.
為什么80%的碼農都做不了架構師?>>> ??
template.php
1.
function szlt_theme(&$existing, $type, $theme, $path) {$hooks = zen_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 array('user_login_block' => array('template' => 'templates/blocks/block-login','arguments' => array('form' => NULL),),);return $hooks; }2. /*** 覆寫登錄框*/ function szlt_preprocess_user_login_block(&$variables) {$variables['form']['name']['#title']='用戶名';$variables['form']['pass']['#title']='密 碼';$variables['form']['submit']['#value']='登 錄';$variables['form']['links']['#value']=''; }
?
block-login.tpl.php
<!--szlt/blocks/block-login -start --> <div class="szlt-row"><?php print drupal_render($form['name']); ?> </div> <div class="szlt-row"><?php print drupal_render($form['pass']); ?> </div> <div class="szlt-login-buttons-row"><?php print drupal_render($form['form_build_id']);?><?php print drupal_render($form['form_token']);?><?php print drupal_render($form['form_id']);?><?php print drupal_render($form['submit']);?><a href="/user/password">忘記密碼</a> </div>
見笑。
?
下面是售后提問時間。
?
?
?
?
?
轉載于:https://my.oschina.net/haojay/blog/76163
總結
以上是生活随笔為你收集整理的drupal 覆写登录框的全部內容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: 准备重新回归信息安全产业
- 下一篇: 超棒的jQuery密码强度检验插件 -