OL Learn

Post Pagination disable a section

Hi there,

I try to disable a page section from Pagination script, when Preview it which shows correctly the section has been skipped however when i use print or proof print, the page are sitll printing
Any ideas?

var sectionAdditonal = merge.template.contexts.PRINT.sections[“AdditionPage”];
merge.context.query("#tableEnd").each(function( index ) {
pageNo = this.info().pageNo;

});
if(pageNo %2 ==0)
{
sectionAdditonal.enabled = false;
}
merge.section.paginate()

I don’t think that ever would work as the Postpagination isn’t the place to disable/enable sections, at this point all pages already got created and nothing can be removed, this would need to be done in a control script.

@MartinS, can you clarify this as @Marten contradicts this in this post: Simplex sections, duplex document

Which is correct?

Hi @jim3108,

Please note that it is not possible to disable or enable a Print Context Section from within a Post Pagination Script by making of the JavaScript code which I have shared by my previous comment. Please use of a Control Script to disable or enable a Print Context Section instead.

P.S. Please note that today I’ve also added the same comment to the forum post to which you are referring to in your comment.