Hub Hack: Display Title and Description Above Flipbook

Follow

Use this Custom Code snippet to display the Item title and description above a Flipbook.


Warning

Hub Hacks are NOT official Uberflip features. They may not work on all Hubs, or may cause unexpected behavior. Before implementing a Hub Hack on a production Hub, we strongly recommending testing it in a safe environment (such as a staging Hub) if possible.

Uberflip Support is not able to help troubleshoot issues with Hub Hacks: if a Hub Hack is not working correctly in your Hub, Uberflip Support can only help you to disable it.

Details

  • Type: JavaScript
  • Placement: Body Bottom (at Hub level) OR Item Content (at Item level)
  • Notes: By default, viewing a Flipbook in a Hub will display the Item's title (and description, if present) below the Flipbook. This JavaScript snippet simply moves those elements above the Flipbook. You can choose to apply this behaviour to all Flipbooks in a Hub by placing this snippet at the Hub level, or only to specific Items by placing it at the Item level (see the note in this article for details on this pacement). 

Code

<script>
var flipbook = document.querySelector('.single-uberflip');
var entryWrapper = document.querySelector('.entry-wrapper');
var flipbookParent = flipbook.parentNode;
flipbookParent.parentNode.removeChild(flipbookParent);
entryWrapper.appendChild(flipbookParent);
</script>
0 out of 0 found this helpful

Comments

0 comments

Please sign in to leave a comment.