Template template = objectState.as(ObjectModification.class).getDefault();
if (template != null && Site.Static.isObjectAccessible(site, template)) {
return template;
}
ObjectType objectType = objectState.getType();
List<Template> usable = new ArrayList<Template>();
for (Template t : Query.from(Template.class).sortAscending("name").selectAll()) {
if (Site.Static.isObjectAccessible(site, t) &&
t.getContentTypes().contains(objectType)) {