I'm trying to make node/add URL appear on front of site to anonymous user and when clicked, it redirects to login or register page. drupal hides links automatically, any help please. I'm using drupal 7

  • 1
    How you adding node/add link on site front page? – MutantMahesh Aug 7 '14 at 12:17
  • 1
    node/add is run through permissions (anonymous does not have). Just add this link l('Add Content', 'user') then it goes to login page automatically. Then you might want to redirect after login to node/add – J. Reynolds Aug 7 '14 at 12:22

You can do that by creating a block as follows

Go to admin/structure/block and add a new block as follows enter image description here

set show block for anonymous user.

enter image description here

and set the Region where you want to display the link on Front page. and if you want to display the link only at front page. make the following settings

enter image description here

  • That is correct, however, OP must still redirect away from Access Denied page to user login page. – J. Reynolds Aug 7 '14 at 12:29
  • @J.Reynolds Oh! yes you're right! I missed that point. – Krishna Mohan Aug 7 '14 at 12:32
  • At least now with your method there is a referrer so a proper determination of redirection can be made. – J. Reynolds Aug 7 '14 at 12:34
  • Thks pals, I formerly created the links with admin/structure/menus before which disappeared after on the front page. I've used your answer to create links as block which works perfect. Also I could redirect anonymous user to login or register before adding a node with drupal.org/project/logintoboggan. Thks again. – Yoric Aug 7 '14 at 18:21

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.