Ok, I was wrong to begin with, it seems...
Found the right part of the code to edit in
mutate_content.dynamic.php from line 613 (MODx 0.9.5 RC3 rev 2017) :
<?php
$sql = "select templatename, id from $dbase." . $table_prefix . "site_templates";
$rs = mysql_query($sql);
?>
<select id="template" name="template" class="inputBox" onchange='templateWarning();' style="width:300px">
<option value="0">(blank)</option>
<?php
while ($row = mysql_fetch_assoc($rs)) {
if (isset ($_REQUEST['newtemplate'])) {
$selectedtext = $row['id'] == $_REQUEST['newtemplate'] ? "selected='selected'" : "";
} else
if (isset ($content['template'])) {
$selectedtext = $row['id'] == $content['template'] ? "selected='selected'" : "";
} else {
$selectedtext = $row['id'] == $default_template ? "selected='selected'" : "";
}
?>
I edited the sql as you instructed and this time around, it works !
:D
I actually think
I am going to submit this into FlySpray Done, it makes more sense to have templates sorted by name rather than ID.
I never had to worry about this before but when you have lots of templates, it’s easier for editors to choose the right one upon editing or creating a document provided you choose a clear and logical naming convention for your templates.
Another thing that I think we should consider : have permissions assigned to templates, that would allow not to display templates which shouldn’t be used by the editors).
Anyway, I’ll soon (hopefully) be able to do this kind of stuff on my own, my PHP/MySQL training is starting december 11th