A Catalog Layout is a form of table data output to show submitted records.
On Custom Tables → Layouts, click Add New. Enter the layout name List of Appointments.
Set Layout Type to Catalog (the “Simple Catalog (All Features)” option is in the Auto Creator dialog) and Table to appointments.

Click Layout Auto Creator.

In the Select the layout type dialog, choose Simple Catalog (All Features), then click Generate.

The generated layout appears on the HTML (Desktop) tab:
<style>
.datagrid th{text-align:left;}
.datagrid td{text-align:left;}
</style>
<div style="float:right;">{{ html.recordcount }}</div>
<div style="float:left;">{{ html.add }}</div>
<div class="datagrid">
<div>{{ html.batch('publish','unpublish','refresh','delete') }}</div>
<table>
<thead><tr>
<th class="short">{{ html.batch("checkbox") }}</th>
<th class="short">{{ record.label(true) }}</th>
<th>{{ fullname.label(true) }}<br/>{{ html.search("fullname") }}</th>
<th>{{ email.label(true) }}<br/>{{ html.search("email") }}</th>
<th>{{ date.label(true) }}</th>
<th>Action<br/>{{ html.searchbutton }}</th>
</tr></thead>
<tbody>
{% block record %}
<tr>
<td style="text-align:center;">{{ html.toolbar("checkbox") }}</td>
<td style="text-align:center;"><a href='{{ record.link(true) }}'>{{ record.id }}</a></td>
<td>{{ fullname }}</td>
<td>{{ email }}</td>
<td>{{ date }}</td>
<td>{{ html.toolbar("edit","publish","refresh","delete") }}</td>
</tr>
{% endblock %}
</tbody>
</table>
</div>
<br/><div style='text-align:center;'>{{ html.pagination }}</div>

To personalize the action buttons, edit {{ html.toolbar("edit","publish","refresh","delete") }} on line 29. In WordPress, double-clicking the tag does not open a parameter dialog.
Click Save Layout.

WordPress converts spaces in the layout name to underscores, so List of Appointments is saved as List_of_Appointments.

A Catalog Layout is a form of table data output to show submitted records.
Click on [New] button to create a new Layout, and enter the Layout Name “List of Appointments” for example.
Select Type – “Simple Catalog”.

Click on “Layout Auto Creator” to generate the Simple Catalog layout.

Click on {{ html.toolbar }} which is on line 30, to personalize the buttons you want to have there. When you finish – Click on “Save”.


Leave a Reply
You must be logged in to post a comment.