Custom template list page, Body

Hello, May I know if this is correct, if no records found i want add a custom design, no records found. This is customtemplate in list page, and body

{{if rows}}  
      {{{rows}}}

    {{else}}

        <tr>

            <td colspan="10" class="text-center py-5 text-muted">

                <i class="fas fa-folder-open fa-2x mb-2"></i>

                <div class="fw-bold">No records found</div>

            </td>

        </tr>
{{/if}}
  1. There is no such data as rows in the template context, you should try ~root.rows.
  2. There is no such tag as {{{rows}}}, you should write your template in CustomTemplateBody if you use {{if}}.
  3. If there is records, there is no "body", the CustomTemplateBody may not be rendered at all, you may need to check if there are rows in the CustomTemplateHeader instead.
  4. If you just want to output "No records found", there is no need to use Custom Templates at all. You may want to try Page_DataRendering server event instead.
1 Like