i wanted to keep some information private in the list view but still show the column. to achieve this, i modified components\com_fabrik\views\list\tmpl\bootstrap\default_row.php (line 20) to this:
basically i checked out the css class the column i wanted to target gets and change the information there for non-admins.
is there way to do this within the fabrik UI without needing to edit a source file? (edit: now that i think about it i guess it is doable with template override.) i think it could be done with list pre-filter but i couldn't figure it out so i resorted to this ugly php bit.
Code:
$user =& JFactory::getUser();
if ($this->cellClass[$heading]['class']=="list1___email fabrik_element fabrik_list_3_group_2") {
if ($user->username!=("admin" or "admin2" or "admin3")){
echo "for admin's eyes only...";
}else{
echo @$this->_row->data->$heading;
}
}else{
echo @$this->_row->data->$heading;
}
is there way to do this within the fabrik UI without needing to edit a source file? (edit: now that i think about it i guess it is doable with template override.) i think it could be done with list pre-filter but i couldn't figure it out so i resorted to this ugly php bit.