Welcome to the in5 Answer Exchange! This a place to get answers about in5 (InDesign to HTML5) and make requests.
0 votes
Hi,

Im with a project using flipbook page peel and my layout would work best if in the mobile version the content of each desktop page turns into two mobile pages for better reading, so for exporting as Responsive Layouts, i tried generating some blank pages to match the page number. Now i want to make those last blank pages (desktop) to become inaccessible for the user. There is a way of doing it?

Or there is a better way of doing this that im not aware of?
in how_to by (320 points)
  

1 Answer

0 votes

You can force a flipbook to display the 2-page spread on mobile only by adding the following code to the JavaScript portion of the Resources section of the Export HTML5 with in5 dialog (in5 > Export HTML5 with in5... or in5 > Easy Export Wizard... and click on the Advanced button):

var getOrientOrig = getOrientation;
getOrientation = function(){ return touchEnabled ? 'landscape' : getOrientOrig; };

If you wanted to force the flipbook to a 2-page spread wherever it's viewed, then the code would be as follows:

getOrientation = function(){ return 'landscape'; }; 

by (26.6k points)
Actually, i think i need to reframe my question.

To export "Responsive Layouts" i need a matching number of pages right? So, for example: my page 2 on desktop is equivalent to 2 and 3 on mobile, but i end up with lots of blank pages in the final part of the desktop version (just to match the page number and allow "Responsive Layouts" export option).

So i wanted the code to tell something like: if the user is on desktop version just allow going to next page up to page 16 then stop (because from 17 onward, the pages dont have any content, they are there just as a fill to enable the export)

Thanks

For a responsive layout using InDesign's Alternate Layout feature to create layouts targeting specific sizes, the page count for each layout needs to match. So page 1 of the desktop layout needs have a corresponding page 1 for the mobile layout, page 2 of the desktop layout needs to have a corresponding page 2, etc. The number of pages in the alternate layouts need to match because in5 uses them to switch between the layouts. Here's more information on Responsive Layouts:

If instead you want layouts for different devices with different page counts, then I would recommend creating a document for each that is exported separately. You can either create a landing page with a link to the desktop version and a link to the mobile version or make one layout the default with a link to the other version. Here's how you can link from one document: