Question

I am working on an application for which i have two types of user in Magento system. Each user can login and reach to their Dashboard. On the user Dashboard depending on what kind of user is logged in, I want to show/hide blocks from layout.

With understanding i have so far, I was able to reach a solution. Where I am adding blocks for both the users in layout update handler and then conditionally based on what kind of user is logged in, I am removing blocks not required for that particular user from layout.

Even though this solution works but i think this isn't the right approach to do the things, as every time i create new controller action I need to put this check and accordingly modify layout.

What can be a better approach to do the same?

No correct solution

Licensed under: CC-BY-SA with attribution
Not affiliated with magento.stackexchange
scroll top