Modula Modula documentation

Creating and editing

Conditional content

A conditional block is a paragraph that changes with a choice made at insertion time: “order shipped” or “order cancelled”, with or without an attachment, in English or in French. A single SmartText then covers several replies.

One paragraph, several versions Basic Pro

A block has a name and choices. Each choice carries its own content: text, formatting, fields, and even other blocks. When inserting, you choose; only the content of the kept choice is inserted.

Example

The SmartText “Order follow-up” contains a block “Status” with three choices: “Shipped”, “Being prepared”, “Cancelled”. Camille types !track and clicks “Shipped”: only the shipping paragraph is inserted, with the tracking number asked for in that paragraph.

Creating a block Basic Pro

How to
  1. Put the cursor on the line after which the block should come.
  2. Click the blocks button in the editor toolbar. The block is placed with its name selected: type it.
  3. Add +, to the right of the name, adds a choice: type its label, then Enter to write its content below.

A block is always a paragraph of its own. It can contain other blocks, three levels at most; each level has its colour. Clicking a choice's line collapses or expands its content.

Good to know

The characters { } and | are not allowed in a name, a label or a description.

Turning existing text into a block Advanced Pro

Select one or more paragraphs, then click the block button: they become a block with a single choice that contains them. Paragraphs are taken whole, even when partly selected. A selection that overlaps an existing block cannot become a block.

With no selection, if the cursor is on a line with text, Modula asks whether to include it in the block: Include the paragraph or Empty block.

As long as the block has not been modified, Undo, on its first line, or Ctrl+Z puts the text back as it was. Typing its name or description does not count as a modification.

Remove from block, when you hover over a choice's line, deletes that choice and places its content right after the block; removing the last choice deletes the block.

Single choice, multiple choice, switch Advanced Pro

TypeWhen inserting
Single choiceOnly one choice kept.
Multiple choiceSeveral choices possible, inserted in the block's order.
SwitchA block with a single choice: you keep it or not — an optional sentence, for example.
  • Default choice: a choice's star preselects it; the block then arrives closed in the form, and you just confirm.
  • If nothing is chosen: Insert nothing, or Required field — the form then refuses to confirm until a choice is kept.
  • Description: a top-level block can carry a short description, typed next to its name. It shows in the form and in previews.

A block's settings Advanced Pro

Clicking a block's first line opens its settings in the right-hand column: Type, If nothing is chosen, the list of choices — star for the default choice, ↑ ↓ for the order, ✕ to delete a choice and its content —, then Duplicate, Copy and Delete the block.

  • Duplicate places a full copy right below the block.
  • Copy keeps it to paste elsewhere, even in another item: place the cursor, click the blocks button, then Paste block “…”.

Moving a block Advanced Pro

Grab a block by its first line and drag it: a line shows where it will land, between two lines of text or inside a choice's content. A move that would go beyond three levels is refused.

Two blocks with the same name Expert Pro

Two blocks with the same name and the same choices are one when inserting: a single choice, applied in both places. Handy for a language chosen once, which changes the greeting at the top and the signature at the bottom.

Same name but different choices: the editor flags it and refuses to save until one of them is renamed.

When inserting Basic Pro

In the insertion form, a block shows its name and its choices as tabs. Hover a tab to see what it would insert; click to keep it. The block closes on its content, which you can reopen with a click.

In a SmartMail Advanced Pro

Blocks also work in the body of a SmartMail, without formatting. They do not go in the recipient, copy or subject.

Previews and search Expert Pro

In the Sidebar, the Launcher and the lists, a block shows as its name and description: a preview is there to recognize the item, not to read it all. Search, on the other hand, finds the text of every choice.

Pro plan Advanced Pro

Creating and editing blocks is a Pro feature (trial included). Without Pro, existing blocks still work when inserting; in the editor, they are read-only. Duplicating, converting, importing or restoring an item remains possible.

Files and older versions Expert

Blocks are read from Modula 2.1 on. An exported file that contains some says so: on an older version, their markers would show up as fields, and every choice would be inserted one after the other.

A damaged block — a file edited by hand, for example — still inserts. Check and repair flags it, without fixing it for you.