Skip to main content
1-Visitor
July 8, 2014
Question

Condition to test if page is odd or even

  • July 8, 2014
  • 3 replies
  • 2171 views

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.

3 replies

16-Pearl
July 9, 2014

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.

rboneti1-VisitorAuthor
1-Visitor
July 10, 2014

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.

12-Amethyst
July 9, 2014

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?

rboneti1-VisitorAuthor
1-Visitor
July 10, 2014

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.

12-Amethyst
July 10, 2014

Robson,

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

rboneti1-VisitorAuthor
1-Visitor
July 10, 2014

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.