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
30 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
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
1answer
28 views

Why would all theme background colors disappear after moving to different server?

A site using MAYO 7.x-1.2 was moved from a Windows IIS to a Linux server. Shortly thereafter, all background colors defined in MAYO settings (and also any custom CSS) have disappeared. Also gone is ...
0
votes
0answers
10 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
2answers
33 views

How can I copy theme configuration when copying a site?

I have written a script that copies a drupal 8 site. The steps go something like this: dump old site database into file replace old site name with new site name in said file create a new database ...
0
votes
1answer
13 views

how to have a different page from the front page?

In my site (psa.modares.ac.ir) all my pages are the same as the front page. for example, I have our team block and price table on the front page but I also see them in blog posts or article pages. why ...
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
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
32 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
61 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
12 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
104 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
69 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
39 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
126 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
109 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
384 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
80 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
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:...
4
votes
1answer
134 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
64 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
788 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
33 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
582 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
268 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
71 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
697 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
192 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
59 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
495 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,...
1
vote
1answer
786 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
56 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
93 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
157 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
36 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
295 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
860 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
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
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
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 ...
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
78 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
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
1answer
509 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
547 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
100 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. ...