Layout templates define the default arrangement of question elements when exams are published.
A layout template controls the position and size of elements such as:
- Question stem
- Answer choices
- Answer area
- Images
Templates make it possible to reuse the same layout across many questions.
How Templates Are Used
PrimeExam can determine a question layout from several levels.
Layout templates are the lowest level. They are used when there is no layout override at the question level or exam question level.
See Layout Overrides.
Default Templates
Default templates are built into PrimeExam.
They provide standard layouts that can be used when no custom layout has been selected.
When an exam is published, PrimeExam may include the code DT to indicate that a default template was used as the source of the layout.
User Templates
User templates are layouts created by the user.
They allow you to define reusable layouts for questions that need a common arrangement.
When an exam is published, PrimeExam may include the code UT to indicate that a user-defined template was used as the source of the layout.
When Templates Are Applied
A layout template is used only when there is no more specific layout override.
For example, if a question has its own layout override, that question-specific layout is used instead of the template.
If an exam question has an exam-level layout override, the exam-level override is used instead.
See Layout Overrides.
Template Matching
When a question is published, PrimeExam attempts to select the most appropriate layout template automatically.
Template selection begins by matching the question type.
For example:
- Multiple-choice questions are matched against multiple-choice templates.
- True/false questions are matched against true/false templates.
- Fill-in questions are matched against fill-in templates.
- Short-answer questions are matched against short-answer templates.
- Essay questions are matched against essay templates.
Each question type typically requires a different arrangement of elements.
For example:
- Multiple-choice templates normally contain a question stem and a choice area.
- True/false templates normally contain a question stem and two choices.
- Fill-in, short-answer, and essay templates normally contain a question stem and an answer area.
Templates with Images
Templates may also contain image elements.
Image elements can be positioned anywhere within the question layout.
Templates may contain:
- No images
- One image
- Multiple images
Image placeholders may be designed for different image shapes, including:
- Portrait images
- Landscape images
- Square images
Matching Questions that Contain Images
When a question contains images, PrimeExam attempts to find a template that is compatible with those images.
After matching the question type, PrimeExam attempts to find a template that contains the appropriate number of image elements.
For example:
- A question containing one image will generally be matched to a template containing one image placeholder.
- A question containing two images will generally be matched to a template containing two image placeholders.
PrimeExam then attempts to match each question image with the most appropriate image element in the template.
When possible, image aspect ratios are considered during this process. For example:
- Landscape images are matched to landscape image elements.
- Portrait images are matched to portrait image elements.
- Square images are matched to square image elements.
This helps ensure that images are displayed in a way that minimizes cropping and makes effective use of the available page space.
No Exact Match Found
If an exact template match cannot be found, PrimeExam will attempt to select the closest available template for the question.
For this reason, it is often useful to create templates that support the image arrangements most commonly used in your question banks.
Editing User Templates
To edit user templates:
- Open the Question Bank window.
- Click Edit Templates in the upper-right area of the window.
This opens the Layout Editor, where user-defined templates can be created or modified.
Why Templates Matter
Templates help keep exams visually consistent.
Instead of manually adjusting the layout of every question, you can create or use templates that provide a standard arrangement for common question types.