What I want to do, is hide subpanels in campaign status, for non administrator users, In order they cannot see their emails.
I've tried to hide the email field, from studio, unsuccessfully, because when I save and deploy the field is always there.
So I ' ve tried this, but don't know if my syntax is ok. I' ve made this in
custom/Extension/modules/Campaigns/Ext/Layoutdefs/layoutdefs.ext.php and custom/Extension/modules/Campaigns/Ext/Layoutdefs/custom.php, but it doesn't work. I also tried the commented lines. I am doing something wrong...:
PHP Code:
<?php
global $current_user;
if(!$current_user->is_admin)
{
// unset($layout_defs['CampaignLog']);
//unset($layout_defs['ProspectLists']);
//unset($layout_defs['track_queue']);
//unset($layout_defs['targeted']);
//unset($layout_defs['view']);
//unset($layout_defs['sent']);
unset($layout_defs['Campaign']['subpanel_setup']['ProspectLists']);
unset($layout_defs['Campaign']['subpanel_setup']['track_queue']);
unset($layout_defs['Campaign']['subpanel_setup']['targeted']);
unset($layout_defs['Campaign']['subpanel_setup']['view']);
unset($layout_defs['Campaign']['subpanel_setup']['sent']);
}
?>
Bookmarks