Is there a way to conditionally apply an @page template?
For example, if we set a variable:
Code: Select all
draftStatus oxy_xpath("(//*[contains(@class, 'bookmap/approved')]/text())[1]");
How can we conditionally apply it?
Code: Select all
@page and string(draftStatus)==not(null) {
size: 8.268in 11in !important;
margin-top: .75in !important;
margin-bottom: 1in !important;
}
@page and string(draftStatus)==null {
size: 8.268in 11in !important;
margin-top: .75in !important;
margin-bottom: 1in !important;
background-image:url("../../images/draft-watermark.png");
background-position:center;
background-repeat:no-repeat;
}