cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Showing results for 
Search instead for 
Did you mean: 

Community Tip - Need to share some code when posting a question or reply? Make sure to use the "Insert code sample" menu option. Learn more! X

Condition to test if page is odd or even

rboneti
1-Newbie

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 6

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.

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.

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?

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.

Robson,

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

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.

Top Tags