Closed (fixed)
Project:
Galleria
Version:
6.x-1.x-dev
Component:
Code
Priority:
Normal
Category:
Support request
Assigned:
Unassigned
Reporter:
Created:
29 Apr 2009 at 10:57 UTC
Updated:
5 May 2009 at 10:49 UTC
This is really a javascript/css query but bear with me, it's related to galleria...
galleria.css has the following setting for the galleria-nav class
.galleria-nav {
clear: both;
display: none;
}
However the navigation area in FF3 is behaving as if its display attribute is set to BLOCK
Viewing source shows no display attribute set for the div, however inspecting with Firebug shows the following:
<div class="galleria-nav" style="display: block;">
The corresponding CSS in Firebug shows:
element.style {
display:block;
}
So this element styling must be coming from somewhere, maybe Javascript?
Can anyone advise how I can get the div's style to be re-set to display:none ?
Thanks
Comments
Comment #1
Mark Theunissen commentedThe correct way would be to override the theme function and remove the nav from the variables array.
The hackish-but-valid method is to add an !important to the css style. Put this somewhere in your css:
Comment #2
frost commentedMark
I know this is more general and not really a galleria question per se, so I do appreciate your time, thank you!
I'm in the process of learning theming, so I'll go for the override theme route if you can provide a little assistance:
Looking at the galleria.module, I'm not sure which function you mean by the "theme function". Is it galleria_theme(), template_preprocess_galleria(&$vars) or another one? I see that the latter has a variables array passed in, but I don't see where it might be using "nav"
Thanks again
Mike
Comment #3
Mark Theunissen commentedSure thing, let me give you a nudge in the correct direction. First, use the 6.x-1.x version of Galleria (the latest code), because it has a few additions and will soon be released as the next Beta.
There is a function in there called
template_preprocess_galleria(&$vars)which creates the variables that get sent to the template filegalleria.tpl.php.So you actually have a choice. You can either copy the template file into your theme directory and remove the
<div class="galleria-nav">from the copy, which will override the original template and the links won't appear.Or, if you want them to appear under certain conditions, e.g. for some nodes and not others, then you can't just remove the section from the template. You then need to write a preprocess function in your theme's template.php file. You would call it
xxxxxxx_preprocess_galleria(&$vars)where xxxxx is the name of your theme. All this function has to do is callunset($vars['next_prev_links']);. That will unset the variable. You could wrap that in anifstatement and do it conditionally if you wanted.More info here: http://drupal.org/node/173880
Good luck!
Comment #4
Mark Theunissen commentedAnd more about preprocessing : http://drupal.org/node/223430
Comment #5
Mark Theunissen commented