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.

60 questions with no upvoted or accepted answers
Filter by
Sorted by
Tagged with
7
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 ...
2
votes
0answers
77 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
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 ...
2
votes
0answers
30 views

Drupal themes all deactivating at irregular interval

I recently updated my website from 7.22 to 7.33. I have a problem with my templates randomly getting disabled. I have 3 themes : desktop / mobile / corpo. My URLs are has follow : www.mywebsite....
2
votes
1answer
315 views

How to give a content editor access to the theme settings?

I'm using the Marinelli theme and want to give my main content editor access to the theme settings. Ideally just the ability to upload/change/add/subtract/enable the backgrounds of the rotating ...
2
votes
0answers
197 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). ...
2
votes
1answer
422 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: UTF-...
2
votes
0answers
659 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
45 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
0answers
66 views

Define custom twig page template for specific pages by page url - page--program.html.twig

I have multiple pages with different content type. All the pages 1st path component is same. So, I want to define a custom twig page template to these pages by their 1st path component. Eg. I have ...
1
vote
0answers
708 views

Twig set classes with multiple conditions

I made a custom theme setting: '#default_value' => theme_get_setting('my_custom_theme_setting'), I created a variable so I can use it: $variables['theme_my_custom_theme_setting'] = ...
1
vote
1answer
195 views

Where is list of theme features in Drupal 8 that can be exposed on the “Settings” page?

In my theme.info.yml file, I can expose features to show up in the settings of my theme. It's documented here: drupal.org theming features: - comment_user_verification - comment_user_picture - ...
1
vote
0answers
60 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
38 views

Theme settings not saving after adding new regions

D8.2x - using adaptive theme. I have successfully added new regions but have not yet been able to add as many as I need. The theme settings save, then I add another region and they do not. Please ...
1
vote
0answers
891 views

drupal admin theme not working for roles other than administrator in drupal 8

I have a theme for the frontend and I use "seven" for the backend as I set it on admin/appearance. I created a new role: "power user", which is a limited access to the different content types. The "...
1
vote
0answers
25 views

How to stop tracking admin user views for the Radioactivity Module

for the Radioactivity module D7, is there a way to stop counting node views/visits from an admin user? This causes the content to be trending when the admin is editing content. https://www.drupal.org/...
1
vote
1answer
178 views

Term reference field - print as other format

I'm using term reference field, which is displaying as entity. I want to print this in the other place of node.tpl, not full entity but only names. Is this possible? I've tried <?php print ...
1
vote
0answers
157 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). ...
1
vote
0answers
345 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 ...
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 ...
1
vote
0answers
47 views

Problem in theme-settings trying to save and modify file drupal 7

I have downloaded a template and what i want to achieve is that i can upload a file from the template option without using the ftp client. I have three slideshows and the code that i have implemented ...
1
vote
1answer
34 views

Enabling a block to inherit the settings of a sub theme

Being relatively new to Drupal, I apologize in advance if what I'm saying is unclear, but I'd imagine that a fix should be simple enough: Basically, I'd like to add a header block that functions ...
1
vote
1answer
40 views

Page view mode and node settings

I have been creating new view modes with the entity view mode module as well as created template files for the new view modes. At this point I would like to know how I tell a given page or url (ie. ...
1
vote
0answers
1k 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 & ...
1
vote
0answers
301 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
1answer
7 views

Save 2 logos in custom theme

I need to save in theme 2 custom logos and use them on the site. Can I somehow create custom field in theme or maybe save the path to another logo in one of the .yml theme files?
0
votes
0answers
12 views

how to display field in Hook_preprocess for the template file

I am trying to display following field to the tpl.php file. However, I do not know how to display this field. $form['ExStart'] = array( '#type' => 'value', '#value' => $overallstart, )...
0
votes
0answers
22 views

Group CSS and JS files for aggregation

The grouping for CSS-JS Aggregation is done on what basis ? For example, there are files A.js, B.js, C.js, D.js and E.js. If I want A.js, C.js in an aggregated file called X.js and B.js, D.js and E....
0
votes
0answers
19 views

Want to change an automatic background image selected by a theme

The Parallax theme 8.x-1.8 comes with a background image I am not able to change. What should I do?
0
votes
0answers
66 views

Theme a block with #theme and twig template file

My custom module theme template is not render by Drupal for some reasons. In my .module file I implement the hook_theme and define my theme settings: /** * Implements hook_theme(). */ function ...
0
votes
0answers
13 views

How do I change the width of a mega slider?

I am using Drupal 7.x. I am using the popular theme is porto. https://i.stack.imgur.com/Kmhok.png Porto comes with a Mega Slider component. And that is what I am using here. I am using the Mega ...
0
votes
1answer
128 views

amp-img tag, replace to simple img

I need to change this tag <img> to <amp-img>, I've been researching about this and I have this function for change the img tag. function amptheme_image($variables) { // Remove RDF ...
0
votes
1answer
34 views

How to load Ajax Site Wide?

I am trying to open a webform in a modal window through following link, which works fine when I am logged in, but when I logout it simply stops working <a class="use-ajax" data-dialog-options="{&...
0
votes
1answer
506 views

How to remove favicon

How can I remove the drupal favicon, I have tried to change the theme settings and global settings but it's not changing anything because I have to put another link if I want to replace it with my own,...
0
votes
1answer
96 views

Core Drupal8 JS necessary for Drupal theme to function

I have recently noticed that Drupal8 is adding number of JavaScript files. I would like to know if it is necessary for theme to function <script src="/core/assets/vendor/domready/ready.min.js?v=1....
0
votes
1answer
162 views

Hook_preprocess - disable CSS caching with drupal_add_css

I'm wondering how to disable css caching when you use the function drupal_add_css. In hook_preprocess I have some dynamic css loading with this function and by default it generates a cached version of ...
0
votes
1answer
40 views

Search Box placeholder how to change it

Here is what is going on I'm checking my site for 508 errors and I'm trying to do a placeholder text change on the search box. How would I go about changing the placeholder text on the search box? ...
0
votes
0answers
41 views

I keep getting these errors even after update.php, it does this with ALL admin themes

I run drupal 7 with AquiaDev Desktop I keep getting these errors, it doesn't matter what amin theme I use also, only show up in backend, doesn't seem to affect front end. Any idea what is causing ...
0
votes
1answer
192 views

How to get file from managed_filed in drupal 8 generate image style and use as background image for a div

I had created a form filed to upload an image on a themes settings page like this $form ['ad_tv']['tv_adbackground'] = array( '#type' => 'managed_file', '#title' => t('...
0
votes
0answers
40 views

How to display Site Name using Custom Block Layout at left corner of header, somehow it is displayed at right side

I am using Drupal 8.2.6, and instead of showing sitename from Configuration Parameter, trying to disply it with custom block. Custom block will use a png file with specific font design for site name. ...
0
votes
1answer
874 views

Set permanent status for managed_file in theme settings

I'm creating some Drupal 8 theme and I need some additional settings for it. So, I have to add some managed_file field in theme settings. I have theme-settings.php file where I define this field and ...
0
votes
1answer
154 views

Adminimal template and CCS adjustments and priority of css files?

In Drupal 7 i use the adminimal template for some pages. I want to adjust some element and added therefore a SASV file into the theme. Now some elements I can override but some elements (like table ...
0
votes
1answer
91 views

filtered_html in theme-settings.php

In my theme-settings.php i want to set text format to 'filtered_html' and display in page.tpl.php. I used this code to display text area: $form['options']['description'] = array( '#type' =&...
0
votes
1answer
287 views

Default value for form_system_theme_settings_alter

I'm trying to set some theme settings, and I can't figure out how to have my settings get their default value, which should be obviously the currently set value. Here's an example: $form['...
0
votes
0answers
322 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 ...
0
votes
1answer
27 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
647 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 ...
0
votes
0answers
121 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 ...
0
votes
1answer
151 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 ...