Skip to main content

This site requires you to update your browser. Your browsing experience maybe affected by not having the most up to date version.

All other Modules /

Discuss all other Modules here.

Moderators: martimiz, Sean, biapar, Willr, Ingo, swaiba, simon_w

Image Gallery images not showing in custom theme


Reply


4 Posts   1483 Views

Avatar
motoservo

Community Member, 24 Posts

17 April 2010 at 3:37pm

I've installed DOM, SWf Upload, and Image Gallery modules. I can get an Image Gallery page to show my images when using Black Candy but I can't seem to get the images to show up on my custom theme. Other Content from the CMS shows up as expected via the $Content var.

Can anyone shine some light on this for me?

Avatar
UncleCheese

Forum Moderator, 4092 Posts

17 April 2010 at 4:31pm

Can you post your template?

Avatar
DanStephenson

Community Member, 115 Posts

21 April 2010 at 3:17pm

Edited: 21/04/2010 3:17pm

I am having the same issue. Using the variable $GalleryLayout to display my gallery outputs nothing.

My template is attached.

Attached Files
Avatar
BlueO

Community Member, 52 Posts

27 May 2010 at 3:53pm

This might be a bit late but I think your problems are caused by the fact that the page is rendered with a different template depending upon how many albums you have. Because:
this function in ImageGalleryPage.php

   public function SingleAlbumView()
   {
      if($this->Albums()->Count() == 1) {
         $this->current_album = $this->Albums()->First();
         return true;
      }
      return false;
   }

Detects if you only have one album and then the following function in the controller:

public function index()
   {
         if($this->SingleAlbumView())
            return $this->renderWith(array($this->getModelClass().'_album','Page'));
         return $this->renderWith(array('ImageGalleryPage','Page'));
   }

renders the initial page with ImageGalleryPage_album.ss

so if you are putting $content or $GalleryLayout in ImageGalleryPage.ss and you only have one album you won't see anything as it is rendered by the _album.ss template. This looks like it is the case in the template that DanStephenson posted.

correct me if i'm wrong?

b

b