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
One challenge using Exhibit with a Content Management System is that the user-editable content region is often too narrow for facets. It would be nice if there were an easy way to put facets in the sidebar instead of the main content region. Datapress provides a more general way to do this, with content remapping.
Using simple data- attribute, Datapress will move HTML elements around the page for you before creating an Exhibit. This way, you can specify a facet in the main content region, but have it moved to the sidebar before the Exhibit is created.
To specify that an element should be moved, add a data-remap="true" attribute to the element. You then need two additional parameters:
A destination, provided with a CSS3 selector that matches one element.
An offset, relative to that destination. Valid offsets are:
replace: replace the destination with the element
append: add the element as the last child of the element
prepend: add the element as the first child of the element
before: add the element as a sibling before the element
after: add the element as a sibling after the element
All together, this means you need three attributes: