Hi,
I am having difficulty attempting to only display the edit button for a Specific User Role say in the intance 'Blog=tester'.
I am trying something like:
<?
global $user;
if (user_access('Blog-tester')): {
print '
'; ?>
endif;
This will not work really and I am using something different for now where the Edit button appears for everyone logged in and simply goes to a blank page if you do not have access. How or is there a way I can make the edit button only appear to who has create it? I am putting the code on each node-contenttype.tpl.php page.
So can someone tell me what code I would use to only display an Edit button if you are the one who created it? How do you perform this type of query? Thank you for your help! Using Drupal 6!
Thank you!
Comments
This should work <?phpif (
This should work
In your
In your node-contenttype.tpl.php just add global $user;if ($user->uid == $node->uid) // display edit button here
Thanks
Yeah that worked out great. Now my only problem is getting my destination pages to be correct with Ajax login register. I'll post that separately.
THANKS FOR YOUR HELP!