Skip to content

Commit 631b83b

Browse files
committed
Add items_per_page to gallery news template
Sets the 'items_per_page' value in the template using the model's gcThumbsPerPage property. Also removes the unused addAlbumToTemplate method for code cleanup.
1 parent ed2da16 commit 631b83b

1 file changed

Lines changed: 3 additions & 8 deletions

File tree

src/Controller/ContentElement/GalleryCreatorNewsController.php

Lines changed: 3 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -95,6 +95,9 @@ protected function getResponse(FragmentTemplate $template, ContentModel $model,
9595
// Add content model to template.
9696
$template->set('content', $model->row());
9797

98+
// Add Pagination
99+
$template->set('items_per_page', $model->gcThumbsPerPage);
100+
98101
// Add meta tags to the page header.
99102
$this->addMetaTagsToPage($this->pageModel, $this->activeAlbum);
100103

@@ -103,12 +106,4 @@ protected function getResponse(FragmentTemplate $template, ContentModel $model,
103106

104107
return $template->getResponse();
105108
}
106-
107-
/**
108-
* Augment template with some more properties of the active album.
109-
*/
110-
protected function addAlbumToTemplate(GalleryCreatorAlbumsModel $albumModel, ContentModel $contentModel, FragmentTemplate $template, PageModel $pageModel): void
111-
{
112-
parent::addAlbumToTemplate($albumModel, $contentModel, $template, $pageModel);
113-
}
114109
}

0 commit comments

Comments
 (0)