What's the deal with Deno? We talk with a major contributor to find out. Listen now.

Questions tagged [theme-settings]

Use it for questions about the settings that can be retrieved with theme_get_setting(). Don't use it for generic settings.

Filter by
Sorted by
Tagged with
17
votes
9answers
19k views

How do I set the theme logo?

How can I set the logo in my custom theme in Drupal 8? I can see that Drupal looks for the logo.svg file. I have a PNG logo.png file that I used in Drupal 7 and I would like to re-use it. I cannot ...
17
votes
6answers
13k views

Change default favicon programmatically

I know I can load a favicon though the user interface, but is there a way of setting the default favicon for your theme, so that when someone enables the theme, the default icon is immediately used?
9
votes
1answer
2k views

Adding a dependencies in theme info file

Can I use dependencies[] = module name in the theme.info file? I want to create a drupal theme where I using some dependencies module, if I able to mention the dependencies in theme info it will easy ...
9
votes
1answer
2k views

How to make a theme depend on a module?

My theme requires multiple modules to be install before it is fully functional. How can one set module dependency in a theme, so that when a user enables the theme, it will also enable the required ...
8
votes
4answers
8k views

Why does the favicon sometimes not show up and generate “page not found” errors, and other times does show up

As the question implies, on occasion Drupal's log is showing that the favicon is not found. Indeed, it does not show in the browser tab or address bar. At other times, even within the same surfing ...
8
votes
0answers
1k views

How do I translate theme settings?

How do you translate custom theme settings in Drupal 8? I use hook_form_system_theme_settings_alter to add custom settings to a theme. One setting is the text string (e.g. 'Menu') to display beside ...
7
votes
2answers
15k 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.
6
votes
3answers
17k views

How to override default favicon.ico?

I would like to load my own, but Drupal seems to forcefully load it's own by default behind the scenes.
6
votes
1answer
3k views

How do I display multilingual logos in D7?

I have read almost every tutorial on the net about how to setup multilingual logos. Yet, I cannot get anything to work. How do I get multilingual logos to display in D7? I have added $conf['...
5
votes
1answer
3k 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'] =...
4
votes
3answers
5k views

Favicon not loading from https

I have enabled https for my site. All images and files are served with https url, but favicon it is serving from http://example.com/sites/default/files/favicon.ico instead it should show as https://...
4
votes
1answer
3k views

Change site logo for an specific content type

I'm building a really simple site and I came into this question now. The site has a few content types and one of them acts as a moderated wiki (only users with a certain role may create/edit that ...
3
votes
2answers
523 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 ...
3
votes
4answers
4k views

How do I save a file with managed_file in a theme?

I'm developing a theme that it requires to have a header image on the front page, so I have this. casper.theme function casper_form_system_theme_settings_alter(&$form, &$form_state) { $form[...
3
votes
3answers
8k views

How to change my maintenance page?

As the title explains, I want to make a custom maintenance page, different from the default one. For that I've read this tutorial: Theming the Drupal maintenance page. I copied the file /module/...
3
votes
4answers
2k 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 ($page['...
3
votes
1answer
697 views

How can I remove the site logo?

I want to remove the logo from my site. I found some instructions on Disabling the Drupal logo in your Drupal 8 theme. My problem is that the instructions say to unselect Logo in the toggle section ...
3
votes
2answers
639 views

Upload Image in system_theme_settings form using Zen on Domain Access System

I want to upload the image as the background in the settings page of the zen theme. In zen , It's easy to add an extra field in the theme-settings.php and it's worked at the single site system. ...
3
votes
2answers
3k views

CSS not loading on Chrome for drupal site after moving to https

I have a Drupal site which has huge content. Recently I moved my dev content on production and also changed the site URL from http to https. The problem is that the site is working fine on all browser ...
3
votes
1answer
760 views

Can't get favicon/shortcut icon to show up

Despite trying multiple times various favicon location approaches: at theme root at files root uploading the file through admin/appearance/settings typing in a path of manually uploaded icon always ...
2
votes
3answers
4k views

How to set theme setting

i need to set theme setting programmatically. I use mothership theme. So for example: $type = theme_get_setting('mothership_classes_view'); dpm($type); //dpm displays 1 - so this setting is checked //...
2
votes
1answer
2k 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 ...
2
votes
4answers
3k views

Override favicon output

Some of search engines (yandex in my case) want me to output favicon with type image/x-icon. But drupal 7 outputs it without this type. How could i override this through template.php or any other ...
2
votes
3answers
2k 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
3answers
4k views

Uploaded images in theme settings is going to be lost

I have a flexslider and I make its images customizable through the theme settings. I added a caption property for the the slide to meet multiple languages websites as follows in theme-settings.php: //...
2
votes
2answers
114 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?
2
votes
2answers
3k views

Drupal 8 Theme Header Background Image Upload

I'm upgrading the Mayo theme to Drupal 8. For Drupal 7 it worked like this in theme-settings.php with hook_form_system_theme_settings_alter(): $form['adv_header']['header_bg'] = array( '#type' =...
2
votes
1answer
145 views

In drupal 7, how can I make clicking the logo navigate to a different site? [closed]

I'm starting a drupal development project to recreate an existing site, doing it in stages. For now, I need the logo in the header to link to the old site, not the homepage of the drupal site. Is this ...
2
votes
1answer
808 views

Custom Logo in Drupal 7

What is the correct way to create a translatable in four languages website logo with slogan? I am thinking of creating a custom content type which will be populated in View block. Which when will be ...
2
votes
2answers
875 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
1answer
1k views

Automatically clear cache

Theme: Basic 8.x-1.x-dev I am trying to clear theme data after any change is done to twig files. I see that rebuildThemeData is here: https://goo.gl/EA2YL4 Currently have this within my .theme file....
2
votes
2answers
140 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 ...
2
votes
2answers
1k views

How to set the file status of files uploaded through theme settings to permanent?

I have been trying for a week to get image files uploaded to a Drupal server through the use of "managed_file" theme settings to remain on the site longer than the default 6 hours. I have visited the ...
2
votes
2answers
3k 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 " ...
2
votes
1answer
475 views

About Corolla Theme Logo

I am using my logo with the Corolla theme but its give me the following error: No setting detected for Mobile first or Desktop first. Please review "Settings > Mobile first or Desktop first" and ...
2
votes
2answers
86 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
3answers
149 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 ...
2
votes
1answer
99 views

Pass a logo to image module

How do I pass the logo on my theme to the image module to create different sizes? I'm using domain access to I can't use <?php print theme('image_style', array('style_name' => 'thumbnail', '...
2
votes
3answers
2k views

How to save custom theme settings in a subtheme?

I've created a subtheme of the Premium Responsive theme. It was working fine until I tried to change some of the advanced theme settings within the subtheme's Appearance page. The parent theme adds ...
2
votes
1answer
2k views

Can't change my custom logo for Bartik-theme. How to fix this?

Have newly installed Drupal 7 . Tried to change my logo to a custom logo. Worked the first time. Theme Bartik was activated. Now wanna change the logo a second time, can't do it. Can't disable it. ...
2
votes
1answer
678 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 top')...
2
votes
1answer
126 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
1answer
2k views

How to change the default logo size in the OpenChurch theme?

I'm trying to upload an image for the logo with a slightly higher resolution than the default logo, but I don't find any way to change the default logo size in the OpenChurch theme. I don't need the ...
2
votes
1answer
551 views

Using theme_get_setting getting empty value

I am using theme settings in my Drupal 7 theme to provide a theme option as follows. $form['mythemename_settings']['loaderImage'] = array( '#type' => 'fieldset', '#title' => t('Loader Icon')...
2
votes
2answers
1k views

Problem with favicon and theme settings

I'm having an insane problem enabling shortcut icon in my theme. When I dpm theme_get_setting('favicon') and theme_get_setting('toggle_favicon') - I get null strings, even though in the Shortcut icon ...
2
votes
2answers
956 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 ...
2
votes
0answers
79 views

Unlimited value field in theme settings

Trying to implement an unlimited value date field in my theme settings, using theme_form_system_theme_settings_alter to add the form inputs, including a button with an ajax callback function, which is ...
2
votes
1answer
142 views

How to add custom text settings to a custom theme?

I'm working on a custom theme called "YingYang". I didn't make the theme, but I have to do some stuff with it. The theme has custom text settings which is bassically some pre-set content. It ...
2
votes
1answer
87 views

Is it possible to set a single member of a complex-variable inside the variable table

I want to use Drush vset to modify a subset of values stored in the 'variable' table's theme_themeName_settings record. I've found references to vget and vset but all I've found so far is for the ...
2
votes
1answer
50 views

Display external link using theme settings

I'm using theme-settings.php to store links to external pages (like Facebook, Twitter, etc.) and the links aren't storing correctly. In theme-settings.php, I have: function ...