Custom Modules Jumping out of the theme

Brandon Sussman

Joined: 2005-10-24
Posts: 50
Posted: Thu, 2008-05-15 02:28

For the following, the album structure is: one album in the root gallery with multiple sub albums.
I have two custom modules. Access to them is displayed in the sidebar. When in the root album, a special theme is used (special sidebar content and special main content).

When the link for either module is clicked (one is a link, the other a form), they change theme using the one assigned to the album and sub albums rather than staying in the theme assigned to the root.
Go to http://media.iearn.org/gallery -- click the search gallery icon and note that some of the content in the sidebar will disappear. The theme has actually changed to the one used if you jump to any album.

What controls this behavior?

How can a module jump out of a theme?

Login or register to post comments
floridave
floridave's picture

Joined: 2003-12-22
Posts: 10096
Posted: Thu, 2008-05-15 06:22
Quote:
How can a module jump out of a theme?

Modules use the default theme. I guess you can tell the module to use a chosen theme if you wish.

Dave
_____________________________________________
Blog & G2 || floridave - Gallery Team

Login or register to post comments
Brandon Sussman

Joined: 2005-10-24
Posts: 50
Posted: Thu, 2008-05-15 13:26
floridave wrote:
Modules use the default theme. I guess you can tell the module to use a chosen theme if you wish.

I am beginning to think I can't :(

I feel a design change request coming on. Allow arbitrary theme or at least current theme. Maybe, after all my investigation I could actually do the code myself :)

Maybe this comes under the heading of either pushing Gallery just beyond what it is meant to do OR trying to get a less-than-totally-correct design to work.

The less-than-totally-correct design in this case is one theme for all albums except the layout that essentially functions as a splash for the site.

Login or register to post comments
floridave
floridave's picture

Joined: 2003-12-22
Posts: 10096
Posted: Thu, 2008-05-15 23:11
Quote:
The less-than-totally-correct design in this case is one theme for all albums except the layout that essentially functions as a splash for the site.

Why not use a different theme for the root album then? Each album can have a different theme.

Dave
_____________________________________________
Blog & G2 || floridave - Gallery Team

Login or register to post comments
Brandon Sussman

Joined: 2005-10-24
Posts: 50
Posted: Thu, 2008-05-15 23:55
floridave wrote:
Why not use a different theme for the root album then? Each album can have a different theme.

Of course. I guess I was not clear - that is what we do now.

The fatal flaw is that we wish to retain the branding(css/layout/etc) that occurs on the specific albums where the module is invoked. This means that the theme for the root album will need to know which the originating album was and style itself accordingly. Seems to me this kind of logic is not 'the Gallery way'. Oh well - worse has been done in the name of science...

It would have been a great deal more straightforward if modules could simply inherit the theme from where they were invoked. We are surprised this is not the default behaviour.

Login or register to post comments
floridave
floridave's picture

Joined: 2003-12-22
Posts: 10096
Posted: Fri, 2008-05-16 00:33

The dynamic album module has a setting for changeing the theme that is used when the module is used. Never looked at the code to see how it is done.

Dave
_____________________________________________
Blog & G2 || floridave - Gallery Team

Login or register to post comments
Brandon Sussman

Joined: 2005-10-24
Posts: 50
Posted: Fri, 2008-05-16 01:07

Thanks for that.

I just went running to look.

I haven't figured it out yet myself.

It is not east code to read :)

A tutorial is needed.

Login or register to post comments
floridave
floridave's picture

Joined: 2003-12-22
Posts: 10096
Posted: Fri, 2008-05-16 05:02
Quote:
A tutorial is needed.

Sure, we just need somebody to do it. :-)

Dave
_____________________________________________
Blog & G2 || floridave - Gallery Team

Login or register to post comments