Is sidebar toggling possible with an image?

Hi all,   The default sidebar widget works with a button click. Is it possible to do the same by using a dynamic image?  
2 answers

Are you referring to the default side bar widget? You could look into changing the icon into an image. Otherwise, you could look into css classes and style it the exact way you want it.



Yes, it is possible to toggle the sidebar in Mendix using an image instead of a button click.

  1. Add an Image widget to your page with the desired toggle icon.
  2. Create a microflow to toggle the sidebar's visibility.
  3. In the Image widget properties, set the "Click event" to "Call Microflow."
  4. Select the microflow created in step 2 as the microflow to call.
  5. Implement the sidebar toggle logic in the microflow using a boolean attribute (e.g., "IsSidebarVisible").
  6. Update the sidebar's visibility on the page based on the "IsSidebarVisible" attribute using conditional visibility settings.
  7. When the image is clicked, the microflow will be triggered, and it will toggle the visibility of the sidebar.