Hiding "View Slideshow" link when there are no images in the album.

peter_k

Joined: 2005-09-15
Posts: 134
Posted: Mon, 2005-09-19 19:55

Can I hide the link to open the slideshow ({g->theme include="itemLinks.tpl"}) if there are no images to show? Now you can click on the link, and you get the message "This album has no photos to show in a slideshow."

I tried to put {if !empty($SlideShow.itemList)} before the link in album.tpl, but this didn't work.

Thanks for any help.

 
valiant

Joined: 2003-01-04
Posts: 32509
Posted: Mon, 2005-09-19 20:03

there's already a feature request for that. good approach to disable it in the theme since we got the information needed there. a cleaner approach would be in modules/slideshow/module.inc .

 
peter_k

Joined: 2005-09-15
Posts: 134
Posted: Tue, 2005-09-20 09:00

i'll try the "good approach", since my programming skills are too limited for the "cleaner approach".

any suggestions on what "if - statement" to use in the album.tpl file to test whether there are images in the album or only sub-albums?

thanx.

 
valiant

Joined: 2003-01-04
Posts: 32509
Posted: Tue, 2005-09-20 09:39
 
peter_k

Joined: 2005-09-15
Posts: 134
Posted: Tue, 2005-09-20 21:30

Thanks! That helped a lot. I'm almost there with my customization effort ...