Create different 'looks' for standalone and embedded gallery

xcer

Joined: 2005-07-20
Posts: 5
Posted: Thu, 2005-08-11 08:09

I use my Gallery both as a standalone and embedded.

In a previous version of Gallery 2.x (before the recent template/theme overhaul), there were seperate .tpl files for embedded and standalone views. (I am using the matrix theme) This meant that I could show a standalone version of my gallery with a customized (local) global.tpl, but the changes to global.tpl would not affect my embedded version of the same gallery (this was a good thing). In other words, one gallery with two different 'looks' for standalone and embedded.

Now with G2 rc1 I see that the global.tpl has been replaced by theme.tpl. But when I customize theme.tpl, the changes now show up in my embedded gallery as well.

My question is: How can I have different HTML page layouts for my standalone and embedded versions of the same gallery? Is this a variable I can set in my embedded gallery? Or can my theme.tpl file somehow check to see whether the gallery is embedded or not before displaying certain code?

Thanks!

 
valiant

Joined: 2003-01-04
Posts: 32509
Posted: Thu, 2005-08-11 08:30

Just out of curiousity, why do you access your G2 still in standalone?
Why does it need to look differently in standalone?

The answer to your question is: No, that's not possible at the moment. We have discussed this and the conclusion was that it would be possible to make this happen with some effort, but we didn't see the use case.

 
xcer

Joined: 2005-07-20
Posts: 5
Posted: Thu, 2005-08-11 20:48

I originally only used Gallery as standalone. Later on, I started using embedded to display specific albums on other sections of my website. The user was NOT able to navigate to other albums from these embedded albums (by my design - I took out the pathBar and the sideBar).

Now I want to give users the option to login from these embedded galleries, but still only view/add items to that specific album.

I think I can accomplish this by converting my exisiting standalone into an embedded and then just putting a few {if} statements in the templates.

Thanks for the help.

 
valiant

Joined: 2003-01-04
Posts: 32509
Posted: Thu, 2005-08-11 20:55

you could copy the theme that you like and then edit theme.inc, put GalleryUtilities::isEmbedded() into the theme variables, then you can check with {if } statements if it's embedded g2 or not.