Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
i like to use this module as a login link. not block cant we make our login link work like that. when some one click on login link in menu the popup open.
i think its so easy but
i couldnt figure somehow!
thanks for advise :)
Comments
Comment #1
alexmoreno CreditAttribution: alexmoreno commentedeasy:
Entrar
Registrate
Comment #2
jaxxham CreditAttribution: jaxxham commentedHi urwen,
Creating links like that doesn't seem to work for me... It justs sends me to the login page with no ajax. Am I missing something?
Comment #3
alexmoreno CreditAttribution: alexmoreno commentedit's important that you respect the class options:
<a href="/ajax_register/login" class=" thickbox" rel="nofollow">Entrar</a><br /><a href="/ajax_register/register" class=" thickbox" rel="nofollow">Registrate</a></p>
im sorry, i suppose when i pasted the code i didn't realize that the text box converted into real links...
Comment #4
gunwald CreditAttribution: gunwald commentedDear Urwen,
I did as you told, my link looks like that:
<a href="ajax_register/login/nojs" class="thickbox active" rel="nofollow">login</a>
But it does not work. Clicking on the link I am forwarded to the login page. Am I missing something?
Comment #5
zhiqiang.qiu CreditAttribution: zhiqiang.qiu commentedI get it work like this:
template.php
function THEME_preprocess_page(&$vars, $hook) {
if(module_exists('ajax_register')){
_ajax_register_include_modal();
$vars['login_link'] = array(
'#theme' => 'item_list',
'#items' => _ajax_register_ajax_links(array('login')),
'#attributes' => array('class' => array('ajax-register-links'))
);
$vars['regist_link'] = array(
'#theme' => 'item_list',
'#items' => _ajax_register_ajax_links(array('register')),
'#attributes' => array('class' => array('ajax-register-links'))
);
$vars['pass_link'] = array(
'#theme' => 'item_list',
'#items' => _ajax_register_ajax_links(array('password')),
'#attributes' => array('class' => array('ajax-register-links'))
);
}
}
page.tpl.php
print render($login_link);
print render($regist_link);
print render($pass_link);