Hi!
Some pages of a site have related ThemePages (many_many as Themes => ThemePage). I can show them easily with:
<% control Themes %>
Only, they are not sorted as I would like to. I’m certainly doing something stupid, since using:
<% control Themes.sort(ID) %>
…renders nothing, but this works:
function sortedThemes() {
$themes = $this->Themes();
$themes->sort('ID');
return $themes;
}
---
<% control sortedThemes %>
Well, I know I can use $default_sort = '`SiteTree`.ID', but I’m curious… :)
Thanks in advance,
Juan