View Single Post
  #6  
Old October 24th, 2012, 10:18 AM
ThomasLewis's Avatar
ThomasLewis ThomasLewis is offline
Senior Contributor
 
Join Date: Feb 2011
Posts: 224
Default Re: Problem activating pages with SetBodyPageUsage

I would go with the loop Eric wrote personally, but you could also just successively add the pages as it checks the page count like this:

Quote:
if (Field("Style") == "A1")
{
var pgct = parseInt(Field("PageCount"));
if (pgct >= 8) FusionPro.Composition.SetBodyPageUsage("A1_1",true );
if (pgct >= 16) FusionPro.Composition.SetBodyPageUsage("A1_2",true );
if (pgct >= 24) FusionPro.Composition.SetBodyPageUsage("A1_3",true );
if (pgct >= 32) FusionPro.Composition.SetBodyPageUsage("A1_4",true );
if (pgct >= 40) FusionPro.Composition.SetBodyPageUsage("A1_5",true );
if (pgct >= 48) FusionPro.Composition.SetBodyPageUsage("A1_6",true );
}

Last edited by ThomasLewis; October 24th, 2012 at 10:20 AM..
Reply With Quote