Posts

Posts uit november, 2018 tonen

Duplicate HTML for responsive views - Placeholders

Duplicate HTML, really? Last week I got a frontend implementation (HTML/CSS/JS) that wasn't quiet to my liking. It contained duplicate HTML for a component that should be displayed on different locations in the HTML to facilitate correct views on desktop and mobile breakpoints. Time limitations on the project didn't allow for the frontender to find an alternative way of removing this duplication and achieving the same result. I didn't feel like introducing device views in Sitecore just for this one component. Luckily the component was in a part of the site that is behind login, so SEO was not a concern. Not only was the HTML the same for the different views of this component, but also its content needed to be the same, and it needed to have the same personalization. For a while I wondered on how to support this in the experience editor, without making the 'content editor' change it's browser window to a different responsive view, nor breaking the look of