Closed (fixed)
Project:
Album Photos
Version:
8.x-5.x-dev
Component:
Code
Priority:
Normal
Category:
Feature request
Assigned:
Unassigned
Reporter:
Created:
14 Apr 2020 at 17:14 UTC
Updated:
30 Apr 2020 at 14:49 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #2
nathaniel commentedThanks for the feedback. A few notes below.
1. /photos/user/{user}/album: it would probably be best to convert this page to a view. That would make it easier for users to make changes.
On 2 and 3 it looks like the template file
photos-image.html.twigcan be edited to include{{ label }}but, that will make it appear on all image display modes. It might be good to include a variable to be able to check view_mode. Something like...Comment #4
jhmnieuwenhuis commentedFor :
Why not enable more fields in manage display.
See two screenshots :
- manage form of photos nodes
- manage display of photos nodes
Then the user can decide what is displayed for an album.
Regards,
Hans
Comment #5
jhmnieuwenhuis commentedFor :
You suggested to alter the twig file and include the {{ label }}
But that won't work for album rearrange, because this label is the label of the cover image, not of the album itself.
You could consider to make the weight field available on the manage form display and manager display
The user can decide whether he want's it to appear on manage form and on manage display settings.
If all fields are available on manage form display and manage display, the user can decide what to edit and what to display
Regards,
Hans
Comment #6
nathaniel commentedOh, I think I understand. Currently cover_id, weight, count, and data (legacy settings) are not fields, they are stored in the {photos_album} table. So they would have to be converted to the field system as needed. On this page: /admin/config/media/photos/display/sort the "Album ID" can be added to display the album title. You'll likely need some custom CSS to make it all look nice.
It would be fairly simple to include the album node / other details as a variable in the template file for now. But, then the "sort" display mode is used on both the image and album sort page, so album title might be redundant on the image sort page. We could add some more options somewhere to select custom display modes for different pages / areas of the site.
Something like this -
View modes can be added here:
/admin/structure/display-modes/view
Then add a new section on /admin/config/media/photos
DISPLAY SETTINGS
Rearrange photos page:
[select box - "sort" as default option]
Rearrange albums page:
[select box - "sort" as default option]
Similar options in the block settings / views. Maybe defaults here to keep the settings together, then an override option in the block settings since there are three different blocks, someone might want different settings for each.
Let me know if you think that might work?
Comment #7
jhmnieuwenhuis commentedI think this would work and i'll be happy to test it.
Regards,
Hans
Comment #9
nathaniel commentedA few notes:
Added photos_album_node variable to photos-image.html.twig. So
{{ photos_album_node.label }}will display the album title.Added theme suggestion hook so photos-image--sort.html.twig (photos-image--[view-mode].html.twig) will work.
Added "Display settings" on /admin/config/media/photos with options for rearrange albums page and rearrange images page - more will come later.
A quick example:
1. /admin/structure/display-modes/view "Add new Photos Image view mode" called "Sort album".
2. Enable new custom display settings: /admin/config/media/photos/display.*
3. Configure the new display: /admin/config/media/photos/display/sort_album.
4. On /admin/config/media/photos select Display settings > Rearrange albums page > "Sort album"
5. For even further customization create a new template file called "photos-image--sort_album.html.twig"
*Added a missed step.
Comment #10
jhmnieuwenhuis commentedHi Nathaniel,
I am very happy with the changes !!
To give a preview of my site i added some screenshots :
=> Photos-rearrange : photos rearrange page
=> Album-rearrange : album rearrange page
=> My-Albums-List-View : my list of Albums ( view using Slick Carousel and Blazy )
=> My-Album-Content-View : Content of one Album ( view using Slick Carousel and Blazy )
=> Clicking on Photo ( not view link ! ) starts photoswipe with photo in it.
The view link works also, but I will not show the view, edit, delete link to normal users. They just click on the photo.
=> My Media-Gallery-view : Has nothing todo with photos, just a gallery of media filtered on some filter-fields.
As you can see the look and feel of Photos and galleries are almost the same.
Layout is responsive, so works fine on mobile. And images are also responsive.
I am using Radix 4 ( bootstrap theme)
The way i will use this is :
- Use a Photos Album for all the photos on a specific subject like a Bike trip or an event.
- Use a gallery for groups of photos like : all cow photos, all photos of a particular tree type, ...
Bot are using the same photos ( media ).
That is why i wanted to be able to use existing media in an Album, else i would end up with duplicate media
At this moment i am testing the setup for a Vps that i am going to rent.
This will be based on a Centos 8 Vps, on which kubernetes ( Rancher K3S ) runs with docker images for
Postgres, Nginx, Npm, Php, Sftp, etc.
There is one thing i do not understand in your previous post :
I do not understand how this would work, there is more i need to do to use that template or ??
B.t.w. Can you give an estimate of the release date for 8.5 ?
Regards,
I hope everything is fine with You and your growing family ;-)
Regards,
Hans
Comment #11
nathaniel commentedVery cool, thanks for sharing the screenshots. Looks like it is coming together!
I think 8.x-5.x is looking pretty good so far. The testing helps a lot. No date at the moment. I need to figure out an upgrade path for image comments and test the upgrade from 8.x-4.x / migration from 7.x. Then we can release an alpha version. I'll update the module page to describe some of the new features in 8.x-5.x and maybe we'll get more testers.
If needed, you can copy the photos/templates/photos-image.html.twig file and paste it in your theme templates folder, then if it is renamed to photos-image--sort.html.twig the code can be changed for only the sort view mode for example (cache will have to be cleared for the site to see the new file).