With field permissions, I restrict the access of a field to certain users.
I would like to display some text to inform the user that he has no access to the field.
I tried it in node.tpl.php :
<?php if (!field_access('view', field_info_field('field_name'),'node', $node)): ?> <p><?php print t('my text.'); ?></p> <?php endif; ?>
It works, but I do not know how to restrict according to the type of content.
How can it be done? Also, is it the good method?