With little search I found this code to print the edit link of any node l("http://localhost/start/$node->nid/edit",NULL,NULL,NULL,FALSE,TRUE);

is this right code ? I am looking to put edit this node link in the template file but not sure about the correct code for it.

Comments

davedelong’s picture

The link would be:
l('Edit this page', 'node/'.$node->nid.'/edit');

However, I'm not sure why you'd need this. Any privileged user would automatically see an edit tab. Are your permissions set up correctly?

christefano’s picture

Perhaps we're about to see a Universal Edit Button module for Drupal?



Christefano  
Founder, CEO
Large Robot
954-247-4786
http://www.largerobot.com
Pushkar Gaikwad’s picture

Yes the code worked :) but its being shown on all the nodes. I just want the edit link to be ONLY seen by the one who has the permission to edit the review.

Ok, here is what I am doing, I am showing teaser a node type at the bottom of different node type and I have removed the Title of the node in these teasers. so they have just become part of the Parent node. But I still want to give the edit link so the owner of the node can edit it. How to do it ?

I have found this http://11heavens.com/quick-edit-and-delete-links-for-the-Administrator and the last code (allowing the owner to edit it) is not workign !!!

dave reid’s picture

Module available for edit links and universal edit button: http://drupal.org/project/admin_links

christefano’s picture

Thanks!



Christefano  
Founder, CEO
Large Robot
954-247-4786
http://www.largerobot.com