great module, not easy to use but there is a lot of possibilities

I link some contact to my published nodes, and when I see the website as an anonymous, I don't see the contact names linked to my nodes.

If I give the permission "View all contact types" to anonymous, they see them, but with a link and the contact details page. I don't want to publish contact details, I just need to see the contact name on my nodes, without link

is it possible ?

thank you

Comments

matthieu_collet created an issue. See original summary.

RoSk0’s picture

You should only give view access for this specific contact type to Anonymous in you your case.
Or you can try to use Field access module to allow access to contact name only, not sure it help because it depend on the ways you are linking contacts to node.

matthieu_collet’s picture

thank you RoSk0, your first solution is not possible for me, I need to keep unpublished details of these contacts

I will try the Field access module module and will say if it works for CRM Core !

grahl’s picture

Status: Active » Closed (outdated)

Closing outdated issue, please reopen if still relevant.

matthieu_collet’s picture

long time issue but the closing is a good opportunity to give part of a possible solution

finally i made a display suite code field, with this kind of code to get the name and firstname :

$contact_to_show=$entity->field_linkedcontact['und'][0];
$name = entity_load('crm_core_contact',$contact_to_show);
if (isset($name[$contact_to_show['target_id']]->contact_name['und'][0]['given']))
     echo $name[$contact_to_show['target_id']]->contact_name['und'][0]['given'];

so this way you don't have any control on permissions...