Questions about theme settings, the settings that can be retrieved with theme_get_setting().
0
votes
0answers
14 views
Does $THEME_URLS = array override theme settings per domain with Domain module?
I have this function in my settings.php:
$THEME_URLS = array(
array('/optoelectronics','optotemp'),
array('/power-devices','optotemp'),
);
foreach ( $THEME_URLS as $info)
if ( ...
0
votes
1answer
17 views
succesfully changed order regions in info file, but rendered html stays untouched
Layout-wise I want 3 columns in this order: sidebar first - content - sidebar right. Since the region order in d7 is content - sidebar first - sidebar second I wanted to change that order in html.
...
0
votes
0answers
97 views
Omega - add new section
I would like to add a new section to my Omega sub-theme but I can't seem to find any documentation on how to do this.
By default there are only 3 sections: Header section, Content section & ...
0
votes
0answers
86 views
“Add More” button in theme-settings.php
The following code is a snippet from the examples for developers project:
function form_example_tutorial_9_add_name($form, &$form_state) {
// Everything in $form_state is persistent, ...
0
votes
2answers
495 views
Use Bootswatch.com themes with Drupal Twitter bootstrap
I would like to know the easiest, simplest and quickest way to use anyone of the bootswatch.com free themes. There are some great themes there, better than I could spend a good 4+ hours trying to do. ...
1
vote
2answers
249 views
How do I apply different css files to different viewports with Omega subthemes?
I´m working with an Omega 3.x Subtheme in Drupal 7.
I´ve been reading the handbook of Omega, specially about the layered css files.
Even if I do understand that the layer structure of the default ...
1
vote
2answers
82 views
Make a field theme function work on empty fields
I am using a field theme function in my template.php file to override a field.
Everything works fine, but the function only seems to run if my field has content. If my field is empty, it does not ...
0
votes
0answers
57 views
How to use images in theme settings
In Drupal 7, I am trying to put an image field to allow an image to be uploaded to the theme settings.
I am using managed file from the form API to do this. Here is my code:
...
0
votes
1answer
122 views
Hide menu titles in Omega subtheme
Can anyone help me how to delete or hide the menu titles (eg MAIN MENU title)?
I know how it is done when I do it on a static template but I cannot find it in Omega.
1
vote
1answer
74 views
Use theme_get_setting to get a value
I am using theme settings in my Drupal 7 theme to provide a theme option as follows:
$form['layout']['body_image_position'] = array(
'#type' => 'select',
'#title' => t('How should Body ...
0
votes
0answers
46 views
Some drupal development theory questions [closed]
Drupal has been my development platform of choice, having tried a few others. I've been using it for a few months now, Mostly just the GUI interface(very little template or any coding).
A list of ...
3
votes
2answers
56 views
Get the Dimensions of the Theme Logo
In Drupal 7 theme settings, you can upload a logo.
How do you print the width and height of this logo in your theme?
Background Research:
theme_get_setting('logo') lets you get the path of a logo ...
1
vote
1answer
97 views
Is there a way to add managed_file field to theme-settings.php?
Anytime I add a managed_file field to theme-settings.php, the field works, however, it gets saved with a status of 0 in the database.
When I add a submit handler to the theme settings form, I get a " ...
0
votes
0answers
84 views
Theme not working after database transfer (Theme key “0” not found)
I have copied the database of my production site to my dev site and my theme is not working anymore (on the dev). The content (nodes) is not exactly the same, but theme folder is.
All the information ...
2
votes
2answers
461 views
Switch to Drupal Mobile Theme Programatically
I found the following code on http://detectmobilebrowsers.com/ and would like to use it to programatically switch from my default theme to a mobile theme that I will also have active.
<?php
...
1
vote
0answers
75 views
Unchecking “rebuild theme cache” caused site to break
I'm new to Drupal and I've unchecked the "rebuild theme cache" option on my Drupal 7 site, now the site only shows a blank white page when loading (no html returned when I view the source on Firefox). ...
1
vote
1answer
97 views
file_create_url printing different addresses on live and local installations
I'm using the following code to print out the path of an image uploaded through theme-settings.php:
<img src="<?php print file_create_url(file_build_uri(theme_get_setting('my_setting')); ?>" ...
1
vote
1answer
75 views
Migrate theme settings between a multisite install on Drupal 7
I have set up a second site on a multisite development instance of Drupal 7. We're using a subtheme based on Adaptive Themes. Being that plans call for about a dozen sibling sites, I would like to ...
2
votes
1answer
140 views
print theme_get_setting in php-as-css file
I'm trying to print out settings from my theme's theme-settings.php into a file called custom.php. Below is the code I'm using in custom.php:
<?php
header("Content-type: text/css; charset: ...
1
vote
1answer
72 views
How to add another color to theme color pallette?
I have custom theme which is using Color Pallette from Bartik. I want to add another color options:
'fields' => array(
'top-bar-' => t('Top Bar background'),
'top' => t('Header ...
0
votes
1answer
322 views
Marinelli Theme: How to add rotating banner like http://marinelli.netsons.org/?
I want to include node title and body field and picture in the rotating banner like in this site: http://marinelli.netsons.org/
Anyone had experience with Marinelli theme and creating a rotating ...
0
votes
2answers
221 views
Drupal module save and retreive theme settings
I am creating a drupal module (my first) and I wish to simply store some variables.
I previousely did this by adding some form elements to the theme-settings.php file but now I want to have my own ...
1
vote
1answer
322 views
Programmatically change logo
I tried two versions:
1.
$form_state = array();
form_load_include($form_state, 'inc', 'system', 'system.admin');
$form_state['values']['var'] = 'theme_settings';
$form_state['values']['logo_upload'] ...
1
vote
0answers
304 views
Omega Sub Theme Settings Page is Blank
I have recently downloaded and installed Omega 7.X-3.1 theme on my Drupal site.
I followed the handbooks instructions to create my first simple HTML5 Omega sub-theme. With the sub-theme enabled I ...
1
vote
1answer
99 views
Parsing a multi-valued theme-setting into to two defaults results in theme-settings not saving
The intention here is to parse out the two integers on either side of the dash, and save them as separate defaults. The problem I'm running into is nothing will actually save when I submit the ...
0
votes
3answers
605 views
Force an empty region to display (D7)
I'm looking for a way to force an empty region to display. I notice Omega does this via a theme-settings checkbox, but I'm unable to track down how it's done.
Regardless of removing the if ...
0
votes
1answer
185 views
Theme settings not getting saved
I created custom settings for my theme for storing email, fb url, twitter url
and g+ url. Everything is coming properly but the settings are not getting saved.
I have no idea whats wrong. All the code ...
1
vote
1answer
148 views
Check if logo, sitename, slogan and secondary links exist (D7)
How do you check if logo/sitename/slogan & secondary links are enabled from within a function? (outside of preprocess_page)
This seems to work for logo:
$logo = theme_get_setting('logo');
if ...
2
votes
2answers
251 views
Problem changing colors in the mayo theme
I have installed the mayo theme on my new site. When I try to go to "appearance" menu, and change the color combination from mayo (default) to anything else, the system saves the settings. but the ...
1
vote
2answers
64 views
Subtheming to add a single template?
As a programmer, I know a great deal about Drupals backend functionality, but little about theming. I'm using Corolla as a theme, and I want to add a single Views template to the theme.
Initially, I ...
3
votes
2answers
98 views
Choose theme depending on the USER_AGENT
How do I use the mobile theme if the $_SERVER['HTTP_USER_AGENT'] is mobile, and use the desktop theme if it is desktop?
1
vote
1answer
193 views
Getting a linkable table of children in hook_block_view from taxonomy_get_children (Drupal 7)
I am trying to programmatically create a block that will display all of the children of the term being referenced by the current page in a linkable table (so that I can click on any of the taxonomy ...
2
votes
2answers
69 views
Within my themes page.tpl.php file it has a reference to a lot of variables like $head and $local_styles. What file are they stored in?
Within my themes page.tpl.php file it has a reference to a lot of variables like $head and $local_styles.
What file are this variables stored at so that I can looked at what each of these variables ...
2
votes
2answers
91 views
Can a block span more than one region in a theme?
Can a block span more than one region in a theme? Sometimes I would like content to do this, depending on the page.
I'm aware (and heavily use) Panels which are great but I thought it would be worth ...
1
vote
1answer
290 views
Can I set a theme's logo_path programmatically?
When adding a logo file to a custom theme, I can either
save my logo in the theme folder as logo.png (replacing the default logo.png from the theme starterkit I'm using), or
save my logo in the ...
1
vote
2answers
313 views
allow user to set some css settings through UI
The user wants to be able to choose some sizes and colors for the look of the site. These are css rules. I have a vague vision how this could be done by a module, but maybe there is already something ...
2
votes
2answers
348 views
I added a new module and it breaks Javascript from my theme. How can I fix? (Drupal 6)
I have recently installed a new module, "Views Nivo Slider", and it is breaking the javascript on my web site that I have added via my theme. I'm at a loss as to what I should do to fix the issue.
...
1
vote
1answer
491 views
Drupal 7 Bartik theme main menu
I am dabbling fresh with Drupal 7 and so far having little success with getting the Menu to behave the way I want it to. My CSS and PHP basics are strong, but understanding Drupal's system is in ...
0
votes
1answer
412 views
Logo not appearing in Seven theme with new Drupal 7 install
I've got a fresh install of D7.9 and have enabled the 'Seven' theme which has an option to override the default logo in Appearance -> Settings. I have uploaded a logo file and can see it via ftp but ...
2
votes
3answers
241 views
How to have html not just sitename or logo in site heading block? (via subtheme or preferably editing WITHIN drupal)
Can someone give examples of using html not just a text string or logo graphic in the header for a site?
I ask because I'd like to use several web typography fonts to make a logp rather than a ...
0
votes
1answer
355 views
How to include javascript code before </body>?
I want to integrate infolink code. Finally I copied this code just before print $closure in page.tpl.php file at the bottom to make it work:
<script type="text/javascript">
var infolink_pid ...
1
vote
3answers
348 views
Sub-theming Garland in Drupal 6
I've gone through Creating a sub-theme, but there is something that is not clear to me.
Why do I need to copy style.css and declare it in the info file as, in the above link, it clearly says that if ...
0
votes
1answer
77 views
Garland theme and h2 heading
On D6.2 I'm using Garland. But instead of generating h1 tags for the title it is generating h2 tag.
What is the best way to make it generate h1 instead of h2?
Should I subtheme it and modify ...
2
votes
1answer
70 views
Provide a subset of the current theme settings page
I'm looking for a way to provide a subset of:
admin/build/themes/settings/<theme_name>
on a different path.
THEMEHOOK_settings doesn't appear to offer the necessarily granularity.
Ideally I ...
2
votes
2answers
337 views
Alter Color module fieldset within theme settings form
I've set up Color module for my theme - it works pretty well, but takes too much vertical space (I have a bunch of colors).
What i'm trying to do is to alter system-theme-settings form to make Color ...
2
votes
3answers
122 views
Change the number of entries depending on a theme setting
I have a theme setting that allows the administrator users to specify how many teasers should be shown on the home page by selecting a number from 1 to 4 (through a <select> field). Is it ...
5
votes
2answers
4k views
How to get the logo path in Drupal 7?
I have a custom logo and I have tried to get his path in this way theme_get_setting('logo_path'), but no expected result.
I am using the code in a custom block, in input PHP.
