card view or table view on list page - user based

This public forum is for user-to-user discussions of PHPMaker. Note that this is not support forum.
Post Reply
mavel
User
Posts: 88

card view or table view on list page - user based

Post by mavel »

Hi,
I want to show records with card view (multiple column) to users other than administrator on the list page. only the table view (single column) will be shown to the administrator. How can I do that? I searched the forum, I couldn't find any sample code. Because it's related to view items


mobhar
User
Posts: 11660

Post by mobhar »

Simply put this following code in Page_Load server event of the List Page:

if (IsAdmin())
    $this->MultiColumnLayout = "table";
else
    $this->MultiColumnLayout = "cards";

Post Reply