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
-2
votes
0answers
41 views

How to access individual form elements in theme?

I have overridden the default user login form in Drupal 8 using a different template in my sub theme, but it isn't of much use because when I access it in twig template, all I can do is <form {{...
0
votes
0answers
17 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
1answer
30 views

Extra Content Appears Below Footer

I have an issue where I have the page for a specific role showing up on every page and additionally an error message. These show up below the footer on the pages. I've gone through the theme files ...
0
votes
0answers
51 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
11 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
53 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
47 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('...
0
votes
0answers
30 views

Don't use admin theme for adding/editing specific content type [duplicate]

Via permissions I've made it possible for my users to see/use the admin theme I use. But I want them to not see the admin theme while adding or editing one specific content type. How can I get this to ...
-2
votes
1answer
101 views

Unable to load CSS and JS files on custom theme [closed]

I don't understand why my CSS or JS files doesn't loaded by drupal. My folder structure is: StarterTheme (starterpf_d8_2019 named folder) |__ CSS folder |__ application.css |__ ...
-2
votes
1answer
55 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
80 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
343 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
74 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
44 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
109 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 ...
-1
votes
1answer
49 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 ...
1
vote
0answers
61 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
2answers
682 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
1answer
31 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
518 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
244 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
70 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
682 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
186 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
58 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
464 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
637 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
52 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
83 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
143 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
33 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
283 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, ... ...
1
vote
0answers
796 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
39 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
1k 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
40 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
74 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
1answer
184 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
472 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
500 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?
1
vote
1answer
88 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
32 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
39 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
390 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
4k 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
435 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
1k 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
355 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
820 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 ...