JoomGalleryfriends / JG4-dev

Development repository for JoomGallery v4.x
GNU General Public License v3.0
10 stars 6 forks source link

Frontend category view #172

Closed Elfangor93 closed 6 months ago

Elfangor93 commented 6 months ago

Extending the frontend category view.

grafik

$this->item->parent Item object of the parent category. Information about the parent category.

$this->item->children List of subcategory item objects. Information about the subcategories.

$this->item->images List of image item objects of this category. Including pagination and filter objects to create a pagination and a filter form.

How to test

Visit index.php?option=com_joomgallery&view=category (category view) in the frontend. There is now a filter form on top of the image grid and a pagination below. grafik

eumel1602 commented 6 months ago

I'm assuming this PR is just about the category view functionality?? (Images not sorted? I didn't discover any errors in the images at first)

When I click on the "Back to: Parent Category" button from a root category (main category), I get an error message "0": Contents:

0
Please provide a valid record ID, alias or filename.
AlexanderSupp commented 6 months ago

When the entered filter value does not match, I have no chance to continue. I expect a specific message and the possibility to continue. If the entered filter value is present, the images are displayed. I have no button to clear the filter. I must close the browser and start a new session.

AlexanderSupp commented 6 months ago

The number of possible pages is incorrect. With only 2 images and a page content of a possible 20 images, only one page is correct. If the last page is displayed, the next page always shows the images from the last page. Screenshot 2024-01-02 192301

AlexanderSupp commented 6 months ago

The allocation of the number of images per page works correctly. The sorting shows a result. Perhaps the fixes to the issues mentioned here are not addressable in this PR. I can not say anything about this.

Elfangor93 commented 6 months ago

@AlexanderSupp The number of sites in the pagination should be fixed. But it irritates me that the search field is displayed for you but it shouldn't. grafik

Can you please check, if the searchtools layout file is available in your installation and if there is no template override for that file. grafik

MrMusic commented 6 months ago

Can you please check, if the searchtools layout file is available in your installation and if there is no template override for that file.

There is no layout folder in components/com_joomgallery... I think the folder entry is missing in the joomgallery.xml: <folder>layouts</folder>

rowi68 commented 6 months ago

Works correctly. I have noticed 2 things:

  1. The categories are sorted in descending order and i see no way to set this ( or I don't know where )
  2. Empty catgories are not displayed
Elfangor93 commented 6 months ago

The categories are sorted in descending order and i see no way to set this ( or I don't know where )

Subcategories should be sorted as "Ordering ascending" and it is done with the code $listModel->setState('list.fullordering', 'a.lft ASC'); Its not ment to be changed within this PR.

Empty catgories are not displayed

This is correct. The following subcategories are not displayes: unpublished, hidden, empty Therefore a subcategory must be published, not hidden and must have at least one image to be displayed.

I will not change this behavior in this PR since its not the focus of this PR.

rowi68 commented 6 months ago

Have made new installation of this PR and "Ordering ascending" of categories is correct. :+1:

reilldesign commented 6 months ago

The introduction of pagination and the option to select the number of photos displayed is a great feature and works perfectly in my test installation.

Please add the two values previous and next to the following link classes.

<a class="page-link previous" aria-label="Go to previous page" ...

<a class="page-link next" aria-label="Go to next page" ...

This will make it easier for me to integrate the Infinity scroll (load more button) in the next pull request.