Skip to main content
Jul 8, 2014 12:53 PM UTC
Question

Condition to test if page is odd or even

How everybody!

There's a way to test whether a page is odd or even? I need to do different actions depending of the page's type.

6 replies

Jul 9, 2014 5:51 AM UTC

If you are using the APP engine then there is a relatively simple way to check the page side, using Javascript FOM (formatting.currentPage.pageNumber % 2). This expression will return a 0 or 1 if even/odd.

For FOSI, I'm not sure you can achieve this without some pretty fancy tricks. FOSI supports usual requirements via odd/even page layouts and "start new odd/even page" functionality.

rbonetiAuthor
Jul 10, 2014 11:23 AM UTC

Thanks Gareth,

I already tried this solution once, and it worked properly. But use the App engine it's not a good solution for my case, because it hampers the project maintenance.

Jul 9, 2014 11:03 PM UTC

There are various ways to do this with FOSI. It all depends on what you need to do. If you are using FOSI, can you provide details?

rbonetiAuthor
Jul 10, 2014 11:30 AM UTC

Thanks Suzanne!

I'm not using the FOSI. I've found a solution for my problem without need to know whether the page is odd or even.

Jul 10, 2014 3:58 PM UTC

Robson,

Could let us know the type of styling that you used, and how you resolved your issue?

rbonetiAuthor
Jul 10, 2014 4:06 PM UTC

Hi Tim,

Actually I didn't resolve this issue. To solve the problem I was having, I didn't need to know if the page is odd or even.