Templates for the database activity allow you to control the visual layout of information when listing, viewing or editing database entries. A basic level of HTML knowledge may be necessary to edit database templates. If
you need help, contact your local eLearning support team.
There are six template types, but the most important ones (for a good user experience) are the Add template, Single template and List template. You will need to make changes to all three templates.
The instructions below are for basic customisations only. For more sophisticated customisations, contact your local eLearning support team.
These instructions tell you how to bold the field names, and make the table that field names and field types sit in more viewable and usable.
To view the complete list of templates, and access the View list, View single and Add entry types:
Click on the database activity you have set up
In the next screen, click on the Templates tab. You
will see the template options. Select the tab you want to create a template
(Add template, Single template, List template)
1. Create an Addtemplate
The Add template determines what users see when they click on the Add entry prompt (ie how the fields are displayed). In this template, you can provide more information/instruction to users about what they need to enter into a field (eg instead of just having the field title, have a question and/or examples). Example field name: 'Duration' – the question could be 'How long did this task take? (Please enter in hours, rounded to the nearest full hour)'
These instructions tell you how to bold the field names, and make the table that the field names and field types sit in more viewable and usable.
As per the steps above (View template options), make sure you are in the Add template tab
To bold field names, highlight the field name and click on the B prompt in the HTML toolbar
To make the table more user friendly, by creating more space between field names (left column) and responses (right column), you will need to go into the HTML code. To do
this, click on the HTML icon in the HTML editor
You will now see the HTML code view for the template
Add style="width:100%;" cellpadding="5" align="left" [+ space after "left"/before code that follows] after <table ...> (ie <table style="width:100%;" cellpadding="5" align="left" ). This code means the table
will use all space available in the screen (width:100%), the distance between table cell and text will be 5 pixels (cellpadding="5"), and text will be aligned left (you could also align "center" (note American spelling) or "right"
To provide instructions to the user adding an entry, put your cursor at the beginning of a right-hand row, and click Enter. Fill in the space above with the instruction
Scroll to the bottom of the screen and click Save template
To see what your changes look like, click on the Add entry tab
2. Create a Singletemplate
The Single template determines how one result looks to the user. This is the template where you can add a user tag so that you know who has contributed.
These instructions tell you how to bold the field names, and make the table that field names and field types sit in more viewable and usable.
As per the steps above (View template options), make sure you are in the Single template tab (under Templates)
Scroll to the bottom of the screen and click Save template
To see what your changes look like, click on the View single tab (you need to have added an entry to see what this looks like)
Add a user tag
If
you add a user tag, you will be able to see who has added an entry, which will
be useful for adding comments etc. You can update the template with this tag
even after the database is open for adding entries (and entries have been added).
These instructions assume you have already set up this template (see above).
Under Templates, click on the Single template tab
With your mouse, select the row in the Single template text box that you want to add a user row/column after/before
Click on the Table iconin the HTML toolbar and select Insert row after or Insert row before (or column)
To
add the user tag, place your cursor where you want it to go in the
template box, then select User (under Other) in the Available tags box.
The ##user## tag should automatically appear in the selected location in your template
table
Scroll down and click Save template
To check, click on the View single tab (add an entry to see how this looks if the database is not yet open to students)
3. Create a Listtemplate
The List template determines how a list of results (entries) looks to the user. You do not need to include every field (eg as for the Add template), particularly when there are lots of
fields. The list can just be some key fields (eg Journal name).
As per the steps above (View template options), make sure you are in the List template tab