layout grid column hidden

0
Hi all. I am doing such a simple home page with a 4-columns layout grid. And want to hide the first column is  ‘User’ role is logged in, and all column is shown if ‘Administrator’ Role user is logged in.  I put in each a container and set the visible attribute of the first container, based on User Role. But When a user of ‘User’ role is logged in, he has the first column empty and blank. Can I eliminate the first blank and empty? then I know I can do it with 'Auto-fill content' attribute of the layout grid. But it is not that acceptable because the column is a bit narrow then others. And I hope we can do it in other ways too. Thanks   also I want to try some dynamic class for the first column. But I found the userrole attribute is not available in the context. Any one who ever try this, please let me know your best practice. Thanks
asked
1 answers
5

Hey Yunlog, 
what you can do is, just remove the read entity access to all other user roles for that attribute except Administrator. This way, no value will be shown to other users.

Hope it helps!

 

**Edited**

answered