7913 Posts in 1355 Topics by 930 members
DataObjectManager Module
SilverStripe Forums » DataObjectManager Module » Latest albums on frontpage
Discuss the DataObjectManager module, and the related ImageGallery module.
Moderators: martimiz, UncleCheese, Howard, Sean, Ryan M., biapar, Willr, Ingo, swaiba, simon_w
| Go to End | ||
| Author | Topic: | 1059 Views |
-
Re: Latest albums on frontpage

10 August 2010 at 8:09am
return DataObject::get("ImageGalleryAlbum", "ImageGalleryPageID > 0", "Created DESC", $num);
-
Re: Latest albums on frontpage

10 August 2010 at 8:37am
if I understood you correctly, this is what my function now looks like:
function LatestAlbums($num=4) {
return DataObject::get("ImageGalleryAlbum", "ImageGalleryPageID > 0", "Created DESC", $num);
}this still returns an error..
-
Re: Latest albums on frontpage

10 August 2010 at 8:45am Last edited: 10 August 2010 8:46am
Thank you so much UncleCheese, this works now after adding an empty parameter before $num.
function LatestAlbums($num=4) {
return DataObject::get("ImageGalleryAlbum", "ImageGalleryPageID > 0", "Created DESC", "", $num);
}
| 1059 Views | ||
| Go to Top |

