mirror of
https://github.com/silverstripe/silverstripe-dms
synced 2024-10-22 14:05:56 +02:00
Sort documents on front-end - Fixes #44
This commit is contained in:
parent
8638440660
commit
3453e51255
@ -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');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -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 %>
|
Loading…
Reference in New Issue
Block a user