Closed Elfangor93 closed 1 month ago
@reilldesign Is there anything else you need to continue the category view in the frontend?
Btw, you can choose how many images you wanna get in the category view by adjusting the list[limit]
request variable. If you set list[limit] = 0
you get all the images from the category. With list[limit] = 20
you a bunch of maximum 20 images.
With the limitstart
variable you can adjust which should be the first image loaded. E.g use limitstart = 0
to load the first bunch of images, and limitstart = 5
to start with 5th image onward.
With the list[fullordering]
variable you can choose the ordering of the image. Default is list[fullordering] = a.ordering ASC
. This means that the images are ordered based on the ordering in the backend in ascending direction. You could also order the images by date by using list[fullordering] = a.date DESC
to get the newest images first.
I hope this helps for your further development of the category view.
@Elfangor93 Thank you for the pagination option. I will continue working on the frontend next week. If I need further options I will let you know. Should I make my additions to this pull request or create a new one?
The Joomla pagination is not displayed and the following code is ignored:
<?php // Show images pagination echo $this->item->images->pagination->getListFooter(); ?>
Close this since it is now part of PR #224
Frontend cleanup
The code style and coding notes of the frontend PHP files are improved and cleaned up. Additionally, all easy to replace deprecations are replaced like
Factory::getDbo;
withFactory::getContainer()->get(DatabaseInterface::class);
.Category view
It introduces a menu item parameter for the category view which allows to override the number of images loaded. If
Use Pagination
is set to No, all images are loaded independently what was chosen in thelist.limit
filter.And there is now a json endpoint for the category view in order to retreive category info and image thumbnails via JavaScript requests (ajax). This is useful for frontend javascript functionalities like a "load more" button.
Request![grafik](https://github.com/JoomGalleryfriends/JG4-dev/assets/39154009/f3b7cfa6-6845-4634-aacc-4d52d094c108)
Respond![grafik](https://github.com/JoomGalleryfriends/JG4-dev/assets/39154009/74c93fdf-816d-4091-b947-2ebe2dcf28a7)