Mustache file not working

Mustache file not working

by EAS CHINTA -
Number of replies: 1

Hi everyone. I am trying to fetch some data and show it through a mustache file but I must be missing something because no data from the database is shown and I am not sure whether or not I am missing something like for example, mention somewhere the mustache template file or not. 

This is the structure and the location of the mustache file.

This is my mustache code: 

<section class="dates">
<table>
<tr>
<td></td>
<th>{{#str}} date, mod_clinic {{/str}}</th>
<th>{{#str}} time, mod_clinic {{/str}}</th>
<th>{{#str}} location, mod_clinic {{/str}}</th>
</tr>
{{#dates}}
<tr>
<td></td>
<td>{{#userdate}} {{starttime}}, {{#str}} strftimedate {{/str}} {{/userdate}}</td>
<td>{{#userdate}} {{starttime}}, %H:%M {{/userdate}} - {{#userdate}} {{endtime}}, %H:%M {{/userdate}}</td>
<td>{{name}} - {{address}} - {{postcode}} {{city}}</td>
</tr>
{{/dates}}
</table>
</section>

When I delete or change anything inside this mustache file, nothing changes either. So it is not a matter of wrong queries or name. The file does nothing basically.
From my understanding I should somehow be "calling" this file in the view.php file, if I am correct? 





Average of ratings: -
In reply to EAS CHINTA

Re: Mustache file not working

by EAS CHINTA -
Found a solution after all. You have to include this in the file you are echoing everything.
echo $OUTPUT->render_from_template('mod_clinic/view', $form);