This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
class CustomObject extends DataObject { | |
private static $db = array( | |
'Sort' => 'Int', | |
); | |
private static $default_sort = 'Sort ASC'; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* Small Devices, Tablets */ | |
@media only screen and (max-width : 768px) { | |
.animated { | |
/*CSS transitions*/ | |
-o-transition-property: none !important; | |
-moz-transition-property: none !important; | |
-ms-transition-property: none !important; | |
-webkit-transition-property: none !important; | |
transition-property: none !important; | |
/*CSS transforms*/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public function PrevNextPage($Mode = 'next') { | |
if($Mode == 'next'){ | |
return SiteTree::get()->filter(array("ParentID" => $this->ParentID, "Sort:GreaterThan" => $this->Sort))->sort("Sort ASC")->limit(1)->first(); | |
} | |
elseif($Mode == 'prev'){ | |
return SiteTree::get()->filter(array("ParentID" => $this->ParentID, "Sort:LessThan" => $this->Sort))->sort("Sort DESC")->limit(1)->first(); | |
} | |
else{ | |
return false; |