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
0
votes
1answer
31 views

How can I check in Twig if an advanced theme setting option is unchecked?

I've a list of advanced theme option(checkbox) to not display, such as search bar. I did many research about custom advanced theme setting, but all the samples are {% if remove_searchbar %}{% endif %}....
0
votes
0answers
23 views

Images get deleted when uploaded to a theme settings field

I've got some custom text_format fields set up in my theme settings, but images don't seem to be working correctly with them. For some reason images uploaded to these fields don't get marked as "used" ...
0
votes
1answer
41 views

Why does my admin page appear corrupted? [closed]

I recently restored a site backup and then re-installed the Paragraphs module. For some reason, the "structure/add paragraph type" page looks like this. Other admin pages are fine. It's not just the ...
0
votes
1answer
41 views

Set new theme setting to default on theme update

Working We have a custom base theme. There are custom theme settings with default values. When the theme is initially installed, the theme settings are correctly set as default. Good. This custom ...
0
votes
1answer
104 views

Set value to specific custom theme setting

I noticed that I can get a specific theme setting like so theme_get_setting('myvar','mytheme'); but I don't see a way of actually setting a setting. Something along the lines of theme_set_value('...
1
vote
1answer
50 views

Subtheme install settings in config but not showing

In a brand new site installation, I created a subtheme of the Bootstrap theme. In the subtheme (let's call "mytheme") config/install/mytheme.settings.yml file, I have the following settings. settings:...
1
vote
1answer
1k views

Allow .svg logo uploading in theme settings

How can I allow using .svg files for the logo field, in the theme settings?
1
vote
0answers
68 views

theme-settings array of data configuration

I'm building a theme and right now I have individual key:value sets and hard coded values in the theme-settings.php for setting up a front page slideshow. I would like to know if there's a way to ...
1
vote
1answer
108 views

How to access individual theme settings from code?

I was building a block for which I have to provide bubblable metadata. The data in this block is depending on individual theme configurations as well as the global theme settings. So I tried the ...
1
vote
1answer
287 views

Remove Parent Theme Settings From Child Theme

I'm in the middle of creating a custom theme using the Bootstrap theme as it's parent. As you may, or may not be aware, the Bootstrap theme comes with lots of useful theme settings. These are great, ...
0
votes
1answer
267 views

Notice: Undefined index: theme_settings in theme-settings.php

I'm creating a custom theme settings and got error this two errors Notice: Undefined index: theme_settings in cocoa_form_system_theme_settings_alter() (line 411 of F:\DEV\SITES\DEV\cocoa\sites\all\...
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 ...
3
votes
1answer
687 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 ...
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 ...
1
vote
1answer
1k views

How to use a relative path for a theme's favicon

I'm trying to ship a favicon with my custom Drupal 8 theme, but I can't figure out how to specify its location relative to my theme's installation location. Following this answer I've created a ...
1
vote
2answers
111 views

How to hide the text format field set using css?

I followed several recommendations and decided to go with using CSS to hide the text format. I don't want to use another module to do something minor like this. Just want to hide text format for this ...
0
votes
0answers
340 views

Print diferent site logo depending on the language

I have two logo. One logo for ENG and one logo for another language. How to print diferent logo on page depending on the language? Does I need to put some if function who would checks language or ...
1
vote
1answer
1k views

Custom submit handler for theme settings form

I am creating a new D8 theme and having slideshow functionality in it. For slideshow, we have title, description and image field in the theme settings form. I am able to alter the theme setting form ...
0
votes
1answer
114 views

Is there an easy way to adjust the block layout?

I have menus that are set to Sidebar First in the Bartik theme. When the screen size decreases, those menus are shown below the main page content. Which file in a copied version of the Bartik theme ...
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....
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[...
0
votes
2answers
2k views

How to get managed_file value url?

I'm trying to add a front page image as part of the theme setting. And so far I'm able to upload the image; however, I need to be able to get this in preprocess function so I can use the in my ...
1
vote
0answers
168 views

Logo settings in sub-theme not working

Followed the step to create a subtheme of bootstrap theme. Now, I am not able to see new logo updated, logo is overridden by default logo of bootstrap. 1) Downloaded Bootstrap project (8.x-3.x-dev). ...
0
votes
1answer
47 views

How to choose a default theme in drupal if your theme give you errow white screen?

I tried to make a folder templates for all tpl files but after that now I can not load my theme anymore on Xamp?. Now when I try to load theme in drupal there was only white screen.What can I do? I ...
0
votes
1answer
29 views

Overriding, create theme from scratch or modifying core theme?

I have noticed there are many ways of doing this and just wanted some advice on which to go for. I have a static webpage and trying to migrate my CSS to Drupal. Can I inherit main functions of a core ...
0
votes
2answers
44 views

Is there any module for image icons and bullets? [closed]

In many sites we see small image bullets and icons before the tabs or text. Like small icon of chat image, or standard small icon of save button. FOR EXAMPLE purpose I have taken the screen shot of ...
17
votes
9answers
18k 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 ...
1
vote
1answer
263 views

Line breaks with theme settings textarea

I'm using the following to get a form field in the theme settings page function theme_form_system_theme_settings_alter(&$form, $form_state) { $form['foo_example'] = array( '#type' ...
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://...
0
votes
2answers
663 views

Cache pages for anonymous users stuck on

I can't turn off the "Cache pages for anonymous users " cache option. I uncheck it and then hit save as usual but it stays on. Is there some sort of module conflict causing this or possibly an issue ...
0
votes
0answers
71 views

Logo does not display after uploading it

After I selected the logo in the theme settings (Appearance > Settings > Choose File), I clicked 'Save Configuration'. It says 'custom logo path is invalid'. I did not have write permission for 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 ...
0
votes
1answer
75 views

Can you retrieve the Omega breakpoint settings?

As the title suggests, is it possible to retrieve the Omega breakpoints you set in the settings for your subtheme via any kind of function or call? Like the ones from the picture.
0
votes
2answers
92 views

Add epsacrop to programmatically added image field

I'm adding an image field to my theme form in order to setup a default image for the user. I'd like the user to be able to use EPSAcrop to crop the image he uploads here. Is this possible, if so; How?...
2
votes
1answer
138 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 ...
1
vote
1answer
118 views

Need help with my form with duplicate file and resetting form

Need help with my form for uploading an image on my theme's settings. I have a form that uploads an image that can be used as a background image. I have two problems with my form: first is how to ...
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', '...
0
votes
1answer
69 views

display results from a form in theme-settings.php

I've been working on a way to upload a background image for months and I finally got it to work. How do I display the URL to the image on page.tpl.php? It's a form called background_file. Here's my ...
0
votes
2answers
512 views

Display Image logo along with site slogan and site name

I am using Impact theme for my site. It either displays text logo(site name, site slogan) or image logo. I want both image logo and text logo for my site. Any helps are welcomed
0
votes
1answer
38 views

How to create a form on settings o settings page [closed]

In template.php file I am using the following code. function MYTHEME_preprocess(&$variables, $hook) { $variables['socialmaintenaceurl'] = "https://twitter.com/test"; $variables['...
1
vote
3answers
1k views

Default logo according to theme setting

I'm creating the theme with two styles, dark and light. User can choose which style he wants in theme settings. My default theme logo is in the root of the theme. Now I want to change default logo ...
0
votes
0answers
127 views

Problem with function from theme-settings.php in sub-theme

I want to create the sub-theme of my custom theme but I have the problem with the function from theme-settings.php. I have a few managed_file fields in my theme settings and my submit function for ...
2
votes
1answer
86 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 ...
1
vote
0answers
358 views

Get field formatter setting value from preprocess

I have added to media>video files a taxonomy term reference "video_quality", i.e. 480, 720... I use those files in a content type "video-article" and render the file with Video.js module. This module ...
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
1answer
549 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')...
0
votes
2answers
862 views

Add custom title and custom alternative text to Logo Image Settings

I am looking for a module that adds custom Title and Alt fields to the box shown below in the Appearance Settings of a theme
1
vote
0answers
59 views

Open Atrium 2: Get back the old design

Is there a way to make Open Atrium 2 look a bit more like Open Atrium 1 (e.g. display icons for the sections)? We'd like to make it easier for our users to switch. Besides OA 1 looks friendlier in our ...
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 ...
0
votes
1answer
153 views

file_managed not working when i try to save permanently

First of all, i want to say that i tried everything, i have coded since 10:30 am and i cannot get the solution, i looked in forums, combined code and many other things and nothing seems to work. What ...