-
Notifications
You must be signed in to change notification settings - Fork 1
HTML Templating
Peter Thomas edited this page Feb 27, 2025
·
1 revision
The Xplorer HTML templating is based on Thymeleaf but made simpler and focused to work directly with simple JavaScript.
Here are some simple examples to get you going:
Use the th:text attribute. Typically use a <span> to be inline with other text.
Job Number: <span th:text="response.body.Job.JobNumber"></span>Use the th:each attribute, which defines the "loop variable". Here below is an example of manually rendering an HTML table.
<table class="table table-bordered table-sm">
<tr>
<th>ID</th>
<th>Image</th>
</tr>
<tr th:each="row: response.body">
<td th:text="row.id"></td>
<td>
<img th:src="row.download_url" height="100px"/>
</td>
</tr>
</table>