Pages and page templates
Every page of a Frontforge Report Server report uses a page template (RFML §9.1). The template sets the paper, the margins, a header and footer, a background drawn behind the content and an overlay drawn above it. A template can have variants for the first, left, right, last and blank pages. A variant overrides some of those settings and takes the rest from its template. The first template in the report is the default one. A section of the body can switch to another template.
You edit a page template in the Inspector, by selecting a page.
Selecting a page
- On the canvas, click a page where there's no box: in a margin, or an empty part of the page. A click on the desk around the pages selects nothing, as Esc does.
- In the outline, click a page template's row (Page A4, for example), or press Enter or Space on it.
- In the Pages tab, click a template in the list, or a page's thumbnail. A thumbnail also scrolls the canvas to its page.
- From the keyboard, run Select the page from the command palette (Ctrl+K). It selects the page of the box that has the keyboard on the canvas, or the page in view.
- From a node in a header, footer, background or overlay, the Inspector says where the node is ("In the footer of default"), and the template's name there selects the page.
- From a band's own scope, Done (or Esc) goes back to the report with the band's page selected.
A page selects what it really uses. Variants don't layer: a page that takes the first-page variant takes its margins and bands, falling back to the template's, never to another variant's. So a click on that page selects the variant (sel=default:first in the address), and a change there moves that page. A page whose template has no variant for it selects the template, All pages.
The address keeps the selection, so a link can open the designer with a page selected.
How a selected page looks
- The page you clicked has a ring and a name tag ("Page 2 · default").
- The other pages that use the same template or variant have a light ring, because a change to it moves them too. A page selected from the outline or the Pages tab has no clicked page, so every page that uses it has the light ring.
- Every page shows the margin guides, which you can drag. A drag is one undo step and sets the margin of the template or variant that the page uses.
The Inspector with a page selected
The Inspector shows one sheet, from top to bottom:
- The page template: its id, default for the default one, and which page you clicked ("Page 2 of 12 uses default. A change applies to every page that uses it."). The variant tabs (All pages, First, Left, Right, Last, Blank) select a variant. A variant the template doesn't have yet is in italics: select it to add it. A variant that exists has Remove variant.
- Paper (the template only): the size, a custom width and height, the orientation and the bleed.
- Margins: one of Word's presets or Custom, then the four sides and the footer distance. On a mirrored template the left and right margins are the inside and outside. A variant that doesn't set its margins says "from the template".
- Header, Footer, Background and Overlay: how many items each holds. Edit opens the band in its own scope on the canvas, and + Text adds a text there. The scope's left panels are the band's outline, Insert, Pages and Assets, so an image in a header can be pointed at one of the report's images, or a linked library's. On a variant, Own copy gives the variant its own band, and Use template's goes back to the template's. The Background and Overlay sections have a lock button, which makes clicks on the canvas go through that layer, on every page of the template (canvas-tools.md). A locked layer's section says Locked.
- Slots, when the template has any: each slot with its label, where it is ("Header; First page header") and what this report puts in it (below).
- Template: Rename (the sections and page breaks that use the template follow the new id), Duplicate, From a library… (puts a library's page template in place of this one, keeping its id), and Delete for any template but the default.
- Footnotes (the template only): how footnotes are numbered and styled.
Every change is one undo step, and the page stays selected through it and through undo.
Filling a page template's slots
A page template can have slots: places in its header, footer, background or overlay where each report puts its own content, such as a reference line under a library's letterhead (RFML 0.3, spec §9.1). The template keeps the rest of the band. A slot shows its default content, which the template gives, until the report gives its own.
- On the canvas, an empty slot shows as a dashed box with its name, and every slot does while you drag something from the Insert panel or the page. Drop onto it to put that in the slot. Double-click a slot, or content in it, to edit its content in a scope of its own, as Edit opens a band: only the slot's content can be selected and changed there. Done goes back to the page.
- In the Inspector, the Slots section lists the template's slots: Edit opens the slot's content in its scope, Text starts it with a text, Use default shows the template's default again, and Clear shows nothing there.
- The content is the report's, kept with the template in its
slots, one for all its variants: a slot of that name on the first page and on the other pages shows the same content. It sees what the band sees, page numbers included, and can't hold footnotes. - A locked template keeps its slots open. A developer can lock a letterhead and leave its slots to the people who write the letters.
- A copy of a library's template keeps the report's content when the library releases a new version (libraries.md). If the new version drops or renames a slot the report has content for, the update asks: Keep my content aside keeps it, not drawn, and the Slots section lists it under Not in the template, with Move to… and Delete; Move it to name puts it in a slot the new version adds.
A report's own templates can have slots too. In a band's scope, the Insert panel's Page slot group adds one: name it, then click or drag Slot to where it goes (in the band, or in a box or frame in it; not in a repeated region).
Keys
| Key | With a page selected |
|---|---|
| Esc | Selects nothing |
| Shift+F10, the Menu key | The page's menu: add, duplicate or delete a template, edit a band (commands.md) |
| Delete, Ctrl+D, Ctrl+X, Ctrl+C | Nothing: these are for boxes. The page's menu duplicates and deletes templates, so a Delete meant for a box can't remove a template. |
The Pages tab
The Pages tab lists the report's page templates, each with its paper, the variants it has, and its slots ("1 slot, 1 filled"). + Template adds one, and From a library… adds a copy of a page template a library has released. Each new template is selected, so the Inspector shows it. The page thumbnails are under the list.
On the Libraries page, a library's page template opens on a stage of three pages with the template selected. Its Template section has Rename only, and there are no footnotes.