Skip to main content

This site requires you to update your browser. Your browsing experience maybe affected by not having the most up to date version.

We're retiring the forums!

The SilverStripe forums have passed their heyday. They'll stick around, but will be read only. We'd encourage you to get involved in the community via the following channels instead:

DataObjectManager Module /

Discuss the DataObjectManager module, and the related ImageGallery module.

Moderators: martimiz, UncleCheese, Sean, Ed, biapar, Willr, Ingo, swaiba

Count Albums


Go to End


10 Posts   2904 Views

Avatar
SS SS

Community Member, 24 Posts

7 January 2012 at 4:33am

Can not find AlbumCount function. Kindly direct me to the right code / files please.

Avatar
SS SS

Community Member, 24 Posts

7 January 2012 at 5:00am

Sorted, wrote two lines in page.php.

public function GalleryAlbumCount()
{
return $this->Albums()->Count();
}

Go to Top