Jun 9, 2021 1:26 PM
I have a few sections that use conditional logic to display different modules on a page, however this creates some issue with the modules not being there when you edit the page. So i'm looking for a way using hubl logic to determine if the page is being edited then show all the modules. I noticed there are some css classes that are different in edit mode and I have in the past used a method where all motions are conditionally hidden with css and shown in the editor, but I would much prefer if I can just use hubl to remove them entirely to prevent bloat from additional unnecessary html. If anyone has any ideas let me know!
Solved! Go to Solution.
Jun 10, 2021 9:18 AM
Jun 10, 2021 11:06 AM
I am looking for more of a template solution rather then a custom module one. I know how to show/hide the content (Im dealing with global content that changes based on language), but if a module is hidden this way then it becomes un editable when editing the page, and only the options that meet the current requierment are available. It could potentualy all be moved into a single custom module but then you lose the other templeting benifits of having individule modules for the content.
I was thinging that maybe using export_to_template_context might be an option, this would atleast make the modules available in the side bar, but you would lose the ability to just "click" to edit the module, and you would not be able to visually see the updates untill published.