If a Template has been configured to contain the Customise step and if the step’s Form-Filling Fields collection contains the Field called _PagesToPrint then the user customising their new Design can enter a number of the page they desire to have in the final output.
Depending on the type of the field’s control - whether it is a text-box or a drop-down box - the user needs to either use the keyboard to type the page-number in the text-box, or, in case of a drop-down box, they can click-select the desired page.
If the Show Just One Page Extension is installed and active on the site, then a Template’s Form-Filling fields collection can be configured to contain one main hidden _PagesToPrint field, plus a number of other hidden fields called _pagestoprint_1 , _pagestoprint_2 , _pagestoprint_3 , etc. It makes only sense if the indexed hidden fields are placed on their corresponding Accordion Tab in the hierarchy of the Form-Filling fields.
In this setup, the Show Just One Page Extension makes sure that whenever the user selects an Accordion tab during their design-customising session, the page index is extracted from the current tab’s _pagestoprint_X hidden field name and is fed to the main _PagesToPrint hidden field’s value, which is used by the Document Action code during the rendering. Thus the preview pane can always display the page which contains the corresponding values of the Fields being customised on the selected Accordion tab. This makes the user experience more intuitive.
The Document Action’s ShowOnePage() method keeps the first page of the design.
Only the first page will be rendered by the server. All other pages will be removed.
If the Template contains the Customise step, which in turn contains the Form-Filling Field called _PagesToPrint then this method reads its value, e. g. “2”, “3”, “4”, and keeps just the page of that number. All other pages are removed from the Design before it is rendered by the artwork server. If the Extension is installed and enabled, the Template can be configured to have the field hidden and its value set by the Extension. The field may be configured to have a default value. In this case, the final output is going to contain only that one specific page.