Search code examples
sitefinity

grid widget remove base on model


I have this View that is using the grid-6+6 layout with two widget in each section. Base on the model I want to not display the one widget and move the number two widget into the first widget location. So if the Model has IsAdmin = true in layout 1 will display admin setting as well as number two widget in section two. If the model has IsAdmin = false two widget will display in layout 1.


Solution

  • In this case, you can do customized logic in your widgets to show/hide based on the IsAdmin value.

    The default Sitefinity layout template does not have that option.