Merge pull request #54 from ss23/sort_fix

Sort documents on front-end - Fixes #44
This commit is contained in:
☃ Stephen Shkardoon ☃ 2015-02-03 15:55:21 +13:00
commit a3deafb669
2 changed files with 5 additions and 5 deletions

View File

@ -119,9 +119,9 @@ class DMSSiteTreeExtension extends DataExtension {
} }
/** /**
* Overloaded to enforce sorting * Enforce sorting for frontend
*/ */
function Documents() { function PageDocuments() {
return $this->owner->getManyManyComponents('Documents')->sort('DocumentSort'); return $this->owner->getManyManyComponents('Documents')->sort('DocumentSort');
} }

View File

@ -1,4 +1,4 @@
<% if Documents %> <% if PageDocuments %>
<div><h3>Documents:</h3></div> <div><h3>Documents:</h3></div>
<% loop Documents %><% include Document %><% end_loop %> <% loop PageDocuments %><% include Document %><% end_loop %>
<% end_if %> <% end_if %>