Merge pull request #51 from xini/1.0

Front end sorting of documents - Fixes #44
This commit is contained in:
☃ Stephen Shkardoon ☃ 2015-02-03 15:48:36 +13:00
commit da642ddaf3
3 changed files with 5 additions and 5 deletions

View File

@ -113,9 +113,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 %>