You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
We are using a template with resources that include Nested Containers to create a dynamic grid in our Container Pages (e.g., TemplateRows or LayoutRows, which are structures used to flexibly organize and arrange content). We have encountered an issue when designing different layouts for desktop and mobile, using the device-dependent design functionality described in the OpenCms documentation:
The problem is that if we create a specific container structure for desktop and another one for mobile within the same container page, any subsequent modification only saves the containers visible in the view being edited. This can be desktop, mobile, or tablet. Elements not visible in that view are lost upon saving.
Apparently, OpenCms only saves in the Container Page the elements that are loaded in the active memory, ignoring those that are hidden at that moment due to the device configuration.
Steps to Reproduce:
Apply a template provider in the format: provider=org.opencms.loader.CmsDefaultTemplateContextProvider,template=/uri/of/your/template.jsp
Dynamically create two resources that generate containers such as Layout Rows, and add different content to each of them.
Configure one of the containers to display only on mobile devices and the other one only on tablets.
At this point, the behavior is as expected: if accessed from a desktop device, one container is displayed; if accessed from a mobile device, the other container is displayed.
Edit any element of the Container Page from the desktop or mobile view.
Upon doing this, the contents of the opposite view disappear, as only the elements visible in the current editing view are saved.
This issue has been reproduced in several versions of OpenCms, from at least version 10.5.4 up to version 18, and can easily be tested in the demo environment.
The text was updated successfully, but these errors were encountered:
We are using a template with resources that include Nested Containers to create a dynamic grid in our Container Pages (e.g., TemplateRows or LayoutRows, which are structures used to flexibly organize and arrange content). We have encountered an issue when designing different layouts for desktop and mobile, using the device-dependent design functionality described in the OpenCms documentation:
Device-Dependent Design in OpenCms Documentation
The problem is that if we create a specific container structure for desktop and another one for mobile within the same container page, any subsequent modification only saves the containers visible in the view being edited. This can be desktop, mobile, or tablet. Elements not visible in that view are lost upon saving.
Apparently, OpenCms only saves in the Container Page the elements that are loaded in the active memory, ignoring those that are hidden at that moment due to the device configuration.
Steps to Reproduce:
Apply a template provider in the format:
provider=org.opencms.loader.CmsDefaultTemplateContextProvider,template=/uri/of/your/template.jsp
Dynamically create two resources that generate containers such as Layout Rows, and add different content to each of them.
Configure one of the containers to display only on mobile devices and the other one only on tablets.
At this point, the behavior is as expected: if accessed from a desktop device, one container is displayed; if accessed from a mobile device, the other container is displayed.
Upon doing this, the contents of the opposite view disappear, as only the elements visible in the current editing view are saved.
This issue has been reproduced in several versions of OpenCms, from at least version 10.5.4 up to version 18, and can easily be tested in the demo environment.
The text was updated successfully, but these errors were encountered: