Stack Exchange Network

Stack Exchange network consists of 174 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange

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.

-2
votes
1answer
47 views

Is it possible to build a brand new theme without using Twig? [closed]

I'd like to move to Drupal 8 for my next project. I understand that, from version 8, Drupal standard template engine is Twig. Is it possible to build a brand new Drupal 8 theme without using Twig at ...
0
votes
1answer
32 views

Kint works in pre_process but not in Twig

On my site, I'm able to use print variables using kint in my pre-process functions. However, when I try to do the same in twig, nothing happens. I do have debug mode turned on. Has anyone ever ran ...
-2
votes
2answers
179 views

Sub-theme navigation menu and footer menu not showing

I have created a sub-theme using a purchased theme. While creating sub-theme I followed these steps as mentioned in the documentation: I have created subtheme.info.yml and subtheme.libraries.yml ...
0
votes
1answer
34 views

Import test data to theme? [closed]

I'm quite new to Drupal, and I'm still in learning process. I've installed a pure Drupal 8, and installed a the YG Agency theme. Right now the theme is only blank. Is it possible to load some test ...
1
vote
1answer
32 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:...
4
votes
1answer
64 views

How to automatically enable custom modules upon theme activation?

I have a custom module that I have defined in the [root]/modules/[custom module] directory. I want it to get activated as soon as someone installs my theme rather than handing over user the custom ...
0
votes
0answers
18 views

How much code from a subtheme's info.yml file should I copy to a second-level subtheme?

I'm trying to subtheme Bootstrap_Mint (https://www.drupal.org/project/bootstrap_mint), but I'm not entirely sure what needs to be copied to my cutomized subtheme files? I get that I should copy the ...
0
votes
1answer
37 views

head_title drupal

in html.html.twig in title tags {{ head_title|safe_join(' | ') }} This code display " home | " how to remove( | ) from display in home page? also in other page display " page | Home " i want title ...
0
votes
0answers
75 views

How to change logo in Theme Nexus?

I am trying to change default logo for Nexus Theme, but it cant. I am trying change at setting theme then upload a logo, but logo not appears. So how to fix it? I need to change the logo.
1
vote
0answers
51 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
1answer
289 views

Allow .svg logo uploading in theme settings

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

favicon shortcut not working on mobile phone

I am setting up a drupal8 site and created a custom theme of Bootstrap. I would like to have a shortcut on my mobile with the favicon used by mytheme. it works in Chrome on my laptop. But it doesn't ...
0
votes
1answer
24 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
278 views

Saving a field of type 'text_format' as a theme settings variable

I try to add a text area with wysiwyg editor in the theme setting. If i use '#type' => 'textfield', it works : If I use '#type' => 'text_format', the text is saved but i don’t see it as ...
0
votes
1answer
137 views

Referencing an existing image in theme settings

In a custom theme (Drupal 8.4.3) I would like to add a theme setting, where I can reference (not upload) an image to use as a background image. Like in a normal reference field, already uploaded ...
1
vote
2answers
55 views

How to render the textfield from custom advanced theme setting?

I'm working on a custom theme with message field(textfield) in custom advanced theme setting. In "theme-settings.php", I added a "textfield" for "message" field <?php function ...
1
vote
0answers
503 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
134 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
votes
2answers
50 views

WSOD after installing and setting a customtheme (subtheme of thunder_base)

I'm pretty new to Drupal so bear with me pls. I created a customtheme (following standards that "some" guides described) i can install my customtheme from "Appearances" everything worked fine thus far ...
0
votes
1answer
336 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
192 views

CSS not applying in drupal 8 site

I have upgraded my site from 8.1.3 to 8.4 after that, while i load any pages. CSS is not been applied View source: while inspecting in browser Cases tried: Placed an image file in the (core/themes/...
1
vote
0answers
38 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 ...
0
votes
1answer
51 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
98 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 ...
1
vote
1answer
30 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
2answers
203 views

How to define theme variations for entities

In Drupal we can define theme settings that can for instance allow us to create "theme variations". For instance allow a user to choose a color-scheme, or even define individual colors, sizes, ... ...
0
votes
0answers
527 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 "...
0
votes
1answer
35 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
2answers
729 views

Theme logo and site name

how can I put logo and site name in an unordered list? I am using a bootstrap subtheme !
0
votes
0answers
38 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 ...
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/...
0
votes
2answers
47 views

Way to have a theme-settings form input to accept numbers only?

I am creating some theme settings and am creating a form to populate them in theme-settings.php. I am using the hook hook_form_system_theme_settings_alter(). I would like to restrict or verify that ...
0
votes
2answers
309 views

Adding Logo to custom Drupal 8 theme as a background

I have a custom Drupal 8 theme that I'm working on. A requirement is that the client logo for this custom theme be a background image on an HTML object. I also need to add script that swaps the ...
0
votes
1answer
157 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
1answer
329 views

Add theme settings field to theme-settings.php in d8 is not working for me

I followed the documentation on drupal.org to add a field to the theme-settings.php but there must be a mistake in code. I have a filed called advertisement and a theme called tv so I tried to copy ...
0
votes
1answer
325 views

How to get rid of “Designed by” in the theme? [closed]

I am using the business theme in Drupal 7. I was wondering how do I get rid of the "Designed by Devsaran." in the bottom right corner?
2
votes
1answer
51 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
30 views

How to disable picture button after click?

I'm new at Drupal CMS and programming at all, but I'm trying to find my way to solve this problem.Unfortunately unsuccesful for now. I've installed Drupal 7.5 and Multipurpose theme which has social ...
0
votes
0answers
37 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. ...
2
votes
1answer
225 views

Print user uploaded logo in twig template

How can I print a user uploaded logo (via the theme appearance UI) in a twig template? For example, in block--system-branding-block.html.twig we can use Available variables: - site_logo: Logo for ...
1
vote
1answer
3k views

Webform file attachment

I've been struggling with an issue today that I just can't seem to figure out. I have a webform that includes a file upload that I want to email upon submission. The email sends correctly (using ...
0
votes
1answer
349 views

How to put icon in field label? [duplicate]

Is it possible to add an icon in front of a field name? I have a field name called Tel and would like to put a phone icon in front of it? I've searched for a while and can't seem to find an answer ...
3
votes
2answers
869 views

How to change the site logo in a preprocess function?

I want to set my site logo programmatically, so that I can change the logo based on URL args. I am able to set the $variables['logo_img']['#uri'] with the following code in MYTHEME.theme but still ...
3
votes
2answers
133 views

How to theme back end forms created by a custom module?

I want to be able to theme a custom form I create using a custom module that builds a form. The form is created programmatically using the code below: public function buildForm(array $form, ...
0
votes
0answers
618 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 ...
3
votes
1answer
150 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
189 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\...
0
votes
1answer
151 views

Unable to Edit Main Navigation Drupal 8

I installed a custom theme called StartupGrowth. At the moment, I am trying to edit the main navigation. When I go to Structure->Menus->Main Navigation and disable the unneeded entries, they do not ...
0
votes
1answer
99 views

Local install of live site looks different

Localhost site looks different than live site. Drupal 7.37 > 7.5 (Commons), viewed in Chrome on Mac OS X. Prep Steps: installed a clone of the website from an outdated repository on my local ...
0
votes
1answer
115 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 ...