Do a custom galleryOuterTpl that prints out just the number of pictures in the gallery, eg. your template would be simply: [+maxigallery.picscount+]
Then use phx conditional in your chunk to decide wether to print it or not:
[+phx:if=`[!MaxiGallery? &galleryOuterTpl=`yourchunkname`]`:gt=`0`:then=`
the above chunk content here...
`+]
But of course this will create alot of overhead as it runs whole maxigallery to just get the picture count and then runs it again if it needs to display images..
It would be better to code a separate snippet for this that queries maxigallery db table.
"He can have a lollipop any time he wants to. That's what it means to be a programmer."
Thanks for the input. I wonder if I could do it with appropriate outer templates. The only problem I see straightaway is the [tt]<div class="gmgalerie">[/tt] around it all. But that would be no problem, I think. I’ll give it a try. I think, that would be the slightest solution.
Edit: This approach does not work. The OuterTpl ist output, even if the gallery is empty. I’ll try and code a snippet that counts the images.
Well did you check what [+maxigallery.picscount+] returns when the gallery is empty?
Also possibly you cannot use :gt in PHx to compare the value that maxigallery returns.. you could check what the snippet call actually returns when the gallery is empty and then use :isnot PHx comparison.
"He can have a lollipop any time he wants to. That's what it means to be a programmer."
Sorry, no I did not try your first proposal. Because of the huge overload.