Conditional line removal

13/08/2008

Sometimes the entire line needs to be removed from the web-to-print template if some of its parts are empty and the rest of the text should shift up or down.  It is  done using a single [square bracket.

A sample CDR file can be downloaded from your Sample Stationery catalog (go to Summary page).

Example

A paragraph text frame that contains 3 lines for contact details should only show the lines that the user inputs data for.

Phone {(456)-123 4567}
Fax {(456)-123 4567}
Mobile {(456)-123 4567}

If the user doesn’t input the Fax number, the line should dissapear and the Mobile number line should shift in its place.

web-to-print, text, conditional removal, optional/

This is achieved by opening a [ square bracket at the begining of the paragraph that we want to make optional without a matching closing bracket ] at the end.

/

/

If we start a new paragraph inside the {curly brackets} with Shift+Enter, rather than just Enter, the field will be recognized as a multiline input field with only one paragraph and all the lines in that field will become optional.

web-to-print, text, conditional removal, optional/

The << sign at the end of the line means that we’ve started a new line without starting a new paragraph.

/

/

/

/

Web-to-print software processing

web-to-print, text, conditional removal, optional/

When the user inputs data in all the fields, all the lines are visible.

/

/

web-to-print, text, conditional removal, optional/

When the user doesn’t input data in Fax Number field, that line dissapears and the mobile number line shifts up in its place.

/

Vertical alignement

web-to-print, text, conditional removal, optional. alignment/

You can also set the text to shift up, down or be centered. Open Paragraph Formatting docker (Text/Paragraph Formatting) and set the vertical alignement of the paragraph frame’s content.

/

/

/

web-to-print, text, conditional removal, optional. alignment/

With the vertical alignement set to “Bottom”, the text inside the paragraph frame shifts down when there is a line missing.

/

/

Note. There is a bug in the system concerning the conditional line removal feature which is that the very last paragraph will not be removed. We recommend you use invisible text after the last line if you want to make it optional and nag us every time you have to do it :-)

/

See also: