We have two different devices within the Sitecore instance as default and mobile. In the experience editor, when the device layout change and do the modification, it will automatically be affected to other device layout as well. Is there any procedure to maintain two different views for mobile and desktop versions? Basically I need to apply two different variants for desktop and mobile.
Yes, you can maintain two different views for desktop and mobile versions in Sitecore by creating separate presentation details for each device layout. Here's how you can achieve this:
First, make sure that your site has separate device databases for each device layout. You can check this by going to the "Content Editor" and navigating to
/sitecore/system/Settings/Devices. Make sure that you have separate device items for both "Default" and "Mobile" devices.
Next, open the item that you want to create separate variants for in the "Experience Editor". Switch to the device layout that you want to modify (either "Default" or "Mobile") using the device switcher in the top-right corner.
Once you have switched to the desired device layout, you can modify the presentation details for that device by clicking on the "Presentation" tab in the ribbon. Here, you can add new renderings or modify existing ones to create the desired layout for that device.
Once you have made the necessary modifications, you can switch to the other device layout using the device switcher and repeat the process to create a separate layout for that device.
By following these steps, you can create separate presentation details for each device layout and maintain two different views for desktop and mobile versions in Sitecore.