Now that I've hierarchically placed some galleries under top level galleries (which act as containers and have no images of their own), both the container galleries, as well as the subgalleries now each display an empty view:

  • The top level galleries have no images, so their own gallery view is empty
  • The subgalleries have no subgalleries of their own, so the subgalleries view is empty

Any tips on how to handle this? I've been trying to hide views entirely when they have no results, but apparently this works OK for block views, but not for page view...

Thank you

CommentFileSizeAuthor
#4 parent_gallery.jpg88.15 KBmarktheshark
#4 child_gallery.jpg50.79 KBmarktheshark
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

scroogie’s picture

Assigned: Unassigned » scroogie
Category: support » bug

How do you mean there is an empty view? Is it displayed for you? There should be nothing visible in such galleries.

marktheshark’s picture

Perhaps it shows because the view has a skinr style applied, however, I would expect that nothing would be rendered in the first place (to apply styles to)... I will post screen-shots when I get back from work.

scroogie’s picture

I assumed that Views would return empty when the View does not return results, but apparently Iwas wrong. I could certainly build in a check for the number of results if the problem persists, at least for subgalleries.

marktheshark’s picture

FileSize
50.79 KB
88.15 KB

Parent gallery has empty view node_gallery_gallery_image_views with display 'View all image thumbnails' from the Node Galleries module.

Child gallery has empty view node_gallery_hierarchy_views with display 'Galleries Cover Grid' from the Node Gallery Hierarchy module.

Attached screenshots (the empty views are the long rounded rectangles with no content).

scroogie’s picture

I just commited a check for the subgallery view, please test it if you can. I'm not sure how to deal with the empty image view. I could override the behaviour of Node Gallery here in Node Gallery Hierarchy, but I'm not sure if that would be the best solution.

marktheshark’s picture

The fix worked, thanks. Now galleries do not display an empty view if they do not have subgalleries. Any recommendation on what to change in Node Gallery to do the same? Would you say that an issue should be opened for that module?

scroogie’s picture

Yes, probably.

marktheshark’s picture

I opened one, though perhaps it will not be accepted as a valid request, since the real need to hide the empty image view arises when there is a non-empty sub-galleries view on the same page...

Perhaps this enhancement would be more at home in the current module.

scroogie’s picture

Well, it's possible to do here... I'm just not sure.

scroogie’s picture

Status: Active » Fixed

Already does hide empty views.

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.