One of the most useful features of Docxpresso is that it allows to clone blocks of content out of the box.
The simplest example of this functionality is given by clonable table rows.
Whenever a table contains variables within all rows affected would be, by default, clonable by the end user.
It is important to notice that this “clonability” does not necessarily restricts to a single row and that if a table contains a series of rows with variables all of them will be clonable as a group (even if in between there is a row with just plain text cells).
Let us first look at the table properties within the edition interface:
Whenever we pass the mouse over a table with variables a “gears” button is shown at the left of the “active” group of rows (only one in this particular simple case).
By clicking on it the following popup will show up:
Where we can configure the following display options (notice that the header info is mainly intended for developers or tech savvy users and as such we will largely ignore the details here).
The options include:
- Clonable: that is checked by default implying that the rows will be clonable by the end user.
- Responsive: if true the table will be shown with a bottom scrollbar in mobile interfaces (it is not marked by default because it may interfere with the displaying of the auxiliary buttons associated with a clonable group of rows).
- Printable: by default, any table is both shown in the browser interface and in the final document but because of diverse reasons we may choose to hide it in any of them:
- Always: default value, the table is shown in all interfaces.
- Browser: the table is only shown in the browser and it will not be printed in the final document (notice that this will affect to the whole table and not just the clonable content).
- Document: the opposite as before, i.e. the table will be printed but not shown in the browser.
- Display: the default display option, that by default will be “Show”. This in contrast to the previous printable option that is global will allow us to show or hide a block of content depending on the value of a variable:
- Variable: the closed options variable that toggle the visibility properties of this table.
- Value: the value of set of values (separated by “;”) that will toggle the visibility of that table, i.e. if the default display property is “show” whenever the chosen variable will take the given value (or any of the given values if more than one) the table will be hidden and vice versa.
IMPORTANT: all these properties are only of application to tables with variables. If we wish to apply them to a “normal table” we should include at least a “hidden type” variable in the table.