can any one helpme to set the login box as popup if a menuitem is clicked.

Comments

marcvangend’s picture

I think it might be difficult to do that automatically, because the permissions for the linked page are only checked when the page is loaded. In other words, when the menu item is clicked, drupal doesn't know yet if the next page would require a login. (People, correct me if I'm wrong!)

A workaround would be to use the menu attributes module (http://drupal.org/project/menu_attributes) to manually add class="login" to the menu items that require login. Also install the lightbox2 module. Next, you would have to write some javascript that changes the href of those menu items (for instance '/node/123') to '/user/login/lightbox2?destination=/node/123' when the user is not logged in.

marquardt’s picture

Lightbox supports this out of the box, I think.

sumitshekhawat7331’s picture

use light box module for this..it has in built property

http://drupal.org/project/lightbox2

swapnaj’s picture

can u give some more information related to that

Thanks.

sumitshekhawat7331’s picture

follow these steps :
1) download thick box module as per your requirement means for drupal 6 or drupal 5

http://drupal.org/project/thickbox

2) enable module

3) now open admin -- site configuration ---- thick box
open settings

4) now click checkbox "Enable for login links"

5) now from primary menu create menu and add path user/login on it

marcvangend’s picture

Lightbox (and probably thickbox as well) supports this on a menu item that links to user/login, but if I understand the original post correctly, the question is about turning all menu items that require login, into lightbox logins. That's what my suggested solution does.

swapnaj’s picture

if i use a thickbox module i am getting popup in the center,my requirement is if i do mouse over on the menu item.i should get the popup of login just below to the menuitem.

thanks.

sumitshekhawat7331’s picture

in this case you should use javascript login box.... means you have to write core coding for this