public function PaginatedGalleries()
    {
        $children = $this->AllChildren();
        $limit = $this->ThumbnailsPerPage;
        $list = ArrayList::create();

        foreach ($children as $child) {
            $image = $child->SortedImages()->first();
            $child_data = $child->toMap();
            $child_data["Link"] = $child->Link();
            if ($image) {
                $child_data["GalleryThumbnail"] = $this->ScaledImage($image, true);
            } else {
                $child_data["GalleryThumbnail"] = null;
            }
            $list->add(ArrayData::create($child_data));
        }

        $pages = PaginatedList::create($list, $this->getRequest());
        $pages->setPageLength($limit);

        return $pages;
    }
public function PaginatedGalleries()
    {
        $children = $this->AllChildren();
        $limit = $this->ThumbnailsPerPage;
        $list = ArrayList::create();

        foreach ($children as $child) {
            $image = $child->SortedImages()->first();
            $child_data = $child->toMap();
            $child_data["Link"] = $child->Link();
            if ($image) {
                $child_data["GalleryThumbnail"] = $this->ScaledImage($image, true);
            } else {
                $child_data["GalleryThumbnail"] = null;
            }
            $list->add(ArrayData::create($child_data));
        }

        $pages = PaginatedList::create($list, $this->getRequest());
        $pages->setPageLength($limit);

        return $pages;
    }
public function PaginatedGalleries ( ) { $ children = $ this -> AllChildren ( ) ; $ limit = $ this -> ThumbnailsPerPage ; $ list = ArrayList :: create ( ) ; foreach ( $ children as $ child ) { $ image = $ child -> SortedImages ( ) -> first ( ) ; $ child_data = $ child -> toMap ( ) ; $ child_data [ "Link" ] = $ child -> Link ( ) ; if ( $ image ) { $ child_data [ "GalleryThumbnail" ] = $ this -> ScaledImage ( $ image , true ) ; } else { $ child_data [ "GalleryThumbnail" ] = null ; } $ list -> add ( ArrayData :: create ( $ child_data ) ) ; } $ pages = PaginatedList :: create ( $ list , $ this -> getRequest ( ) ) ; $ pages -> setPageLength ( $ limit ) ; return $ pages ; }
Get a custom list of children with resized gallery images

@return PaginatedList
Get a custom list of children with resized gallery images