Hide empty albums from view
agentrickard
Joined: 2005-04-13
Posts: 2 |
Posted: Wed, 2005-04-13 13:33 |
This is almost covered in the thread: But not quite. We have a very nice Drupal/G2 integration going here: One UI question. We have the default for this gallery set to "Create User Albums When First Accessed," and we still have a number of users who have not loaded photos in. I have hacked the code to display a default "no images message," and that's ok, but we would prefer to hide empty galleries (and not include them in the total active gallery count). Users can click the Your Album link to access their empty galleries, so we don't need to present them on the page. I couldn't find a way to omit the blanks from the list. The closest I came was wrapping the entire display block in an {if child.thumbnails} and assume that galleries with images would have thumbnails. This didn't display blank galleries, but they were still counted. Any ideas? |
|
Posts: 7994
It's a little tricky to hide them from the count because we do that based on permissions (and it's non trivial to do it efficiently). But you could just delete them, and the next time they go back to their own album it'll get recreated the next time the user shows up and wants to use their album. We could probably whip up an automated way to do that, I bet.
Posts: 2
Too many galleries to delete manually. It would be better to have a configuration option for the Album:
checkbox: "Show Empty Galleries"
default = no.
I suppose that qualifies as a feature request.
Posts: 34
Hi,
I would like to do this (wrap a display block in an {if child.thumbnails} to achieve this. The album count is not so important.
Could you guide me to the file to edit and where the display block is located? Thanks.
Posts: 1
This would be a great feature to have... Removing albums or hiding them if no pictures exist.
Posts: 24
Has any progress been made on this?
Posts: 24
Does anyone respond to these forums? Or are all the questions I have just unsolvable. ;)
Posts: 1
Any progress on this?
Thanks
Jason
Posts: 16504
Try searching the forums (yeah, I know that's how you found this 4+ year old thread) but someone did post a hack on how to do this. If I run across it, I'll post back in here.
____________________________________________
Like Gallery? Like the support? Donate now!!! See G2 live here
Posts: 16504
Ah, read this thread:
http://gallery.menalto.com/node/60098
____________________________________________
Like Gallery? Like the support? Donate now!!! See G2 live here