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