All Questions

Filter by
Sorted by
Tagged with
0
votes
2answers
2k views

Drupal module save and retreive theme settings

I am creating a drupal module (my first) and I wish to simply store some variables. I previousely did this by adding some form elements to the theme-settings.php file but now I want to have my own ...
0
votes
2answers
2k views

Center header logo in Bartik theme [closed]

I am using the Bartik theme in Drupal 7.15 and would like to have the header logo centered rather than left-aligned, is there some little piece of CSS I can add in with drupal_add_css() that will ...
2
votes
1answer
679 views

How to add another color to theme color pallette?

I have custom theme which is using Color Pallette from Bartik. I want to add another color options: 'fields' => array( 'top-bar-' => t('Top Bar background'), 'top' => t('Header top')...
2
votes
1answer
430 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-...
1
vote
1answer
231 views

Migrate theme settings between multisite installations

I have set up a second site on a multisite development instance of Drupal 7. We're using a subtheme based on Adaptive Themes. Being that plans call for about a dozen sibling sites, I would like to ...
6
votes
1answer
3k views

How do I display multilingual logos in D7?

I have read almost every tutorial on the net about how to setup multilingual logos. Yet, I cannot get anything to work. How do I get multilingual logos to display in D7? I have added $conf['...
2
votes
0answers
199 views

Unchecking “rebuild theme cache” caused site to break [closed]

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). ...
0
votes
0answers
267 views

Theme not working after database transfer (Theme key “0” not found)

I have copied the database of my production site to my dev site and my theme is not working anymore (on the dev). The content (nodes) is not exactly the same, but theme folder is. All the information ...
2
votes
2answers
3k views

Is there a way to add managed_file field to theme-settings.php?

Anytime I add a managed_file field to theme-settings.php, the field works, however, it gets saved with a status of 0 in the database. When I add a submit handler to the theme settings form, I get a " ...
3
votes
2answers
525 views

Get the Dimensions of the Theme Logo

In Drupal 7 theme settings, you can upload a logo. How do you print the width and height of this logo in your theme? Background Research: theme_get_setting('logo') lets you get the path of a logo ...
0
votes
5answers
182 views

Different favicon for local version of site?

It's a small thing, but it would be nice if a site running locally could use a different version of a favicon, to make it easier to separate local and live sites visible in browser tabs. I had in ...
1
vote
1answer
2k views

Use theme_get_setting to get a value

I am using theme settings in my Drupal 7 theme to provide a theme option as follows: $form['layout']['body_image_position'] = array( '#type' => 'select', '#title' => t('How should Body ...
1
vote
1answer
492 views

Hide menu titles in Omega subtheme

Can anyone help me how to delete or hide the menu titles (eg MAIN MENU title)? I know how it is done when I do it on a static template but I cannot find it in Omega.
1
vote
2answers
5k views

How to use images in theme settings

In Drupal 7, I am trying to put an image field to allow an image to be uploaded to the theme settings. I am using managed file from the form API to do this. Here is my code: $form['footer']['...
1
vote
1answer
2k views

Changing the url which the logo links to

I'm using Zen Theme 5.x and want that the site logo links non to the front page but another page in my base url, like to a contact page. It seems that I can achieve this modifying the page template ...
0
votes
1answer
1k views

How do I set a multilingual site name?

I'm using a multiligual site in french,english and arabic and i want to set a custom sitename (or logo) for each one,for ex: if my sitename for english is : "one two three" i want it "un deux trois" ...
1
vote
2answers
287 views

Make a field theme function work on empty fields

I am using a field theme function in my template.php file to override a field. Everything works fine, but the function only seems to run if my field has content. If my field is empty, it does not run....
1
vote
2answers
6k views

How do I apply different css files to different viewports with Omega subthemes?

I´m working with an Omega 3.x Subtheme in Drupal 7. I´ve been reading the handbook of Omega, specially about the layered css files. Even if I do understand that the layer structure of the default ...
1
vote
2answers
4k views

Use Bootswatch.com themes with Drupal Twitter bootstrap [closed]

I would like to know the easiest, simplest and quickest way to use anyone of the bootswatch.com free themes. There are some great themes there, better than I could spend a good 4+ hours trying to do. ...
3
votes
1answer
771 views

Can't get favicon/shortcut icon to show up

Despite trying multiple times various favicon location approaches: at theme root at files root uploading the file through admin/appearance/settings typing in a path of manually uploaded icon always ...
4
votes
1answer
3k views

Change site logo for an specific content type

I'm building a really simple site and I came into this question now. The site has a few content types and one of them acts as a moderated wiki (only users with a certain role may create/edit that ...
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 & ...
0
votes
1answer
50 views

succesfully changed order regions in info file, but rendered html stays untouched

Layout-wise I want 3 columns in this order: sidebar first - content - sidebar right. Since the region order in d7 is content - sidebar first - sidebar second I wanted to change that order in html. ...
2
votes
1answer
824 views

How to pass a form field value from THEME_system_theme_settings_alter() to THEME_form_system_theme_settings_submit()

MYTHEME/theme-settings.php: THEME_form_system_theme_settings_alter() builds an input form for /admin/appearance/THEME and the input (values) of the user will not be known by Drupal nor by ...
1
vote
1answer
1k views

Don't render html.tpl.php for a specific path

Is it possible to load page content without rendering html.tpl.php? I mean on default Drupal has the follwoing: Html.tpl.php --> Page.tpl.php -->...(etc.) my goal is to remove Html.tpl.php for a ...
1
vote
2answers
8k views

How to add css class attributes to the anchor element inside the links of a given menu by theme function

Do I miss something or is it impossible to theme the link anchor HTML element <ul class="main-menu"><li><a href="" class="put something in here"></li></ul> for a ...
0
votes
1answer
61 views

How to pass values directly from THEME_NAME.info to THEME_form_system_theme_settings_submit()

Does anyone know a smarter way to load given settings from the THEMENAME.info file for the submit function only, than to create another "ghost"-form calling theme_get_setting() ? I would like to ...
8
votes
4answers
8k views

Why does the favicon sometimes not show up and generate “page not found” errors, and other times does show up

As the question implies, on occasion Drupal's log is showing that the favicon is not found. Indeed, it does not show in the browser tab or address bar. At other times, even within the same surfing ...
2
votes
1answer
2k views

Can't change my custom logo for Bartik-theme. How to fix this?

Have newly installed Drupal 7 . Tried to change my logo to a custom logo. Worked the first time. Theme Bartik was activated. Now wanna change the logo a second time, can't do it. Can't disable it. ...
0
votes
0answers
20 views

adding id attribute when linking stylesheet from themeName.info [duplicate]

I am working on drupal theme. In past, i linked stylesheets via the themeName.info file as follows: stylesheets[all][] = css/thickbox/thickbox.css stylesheets[all][] = css/custom.css However, this ...
0
votes
1answer
339 views

Plugin Not Found Exception

I am implementing REST in Drupal 8. I have created a custom plugin for REST resource, enabled the plugin and configured permissions for that REST endpoint. After few days, I removed the code for ...
0
votes
2answers
506 views

only allow to upload profile pictures of a certain size

I want to limit the user to only upload profile pictures of 160x160 size. What is the simplest way to validate that the resolution of uploaded avatar picture is actually 160x160, and provide an error ...
1
vote
2answers
421 views

TinyIMCE not working: looking for image files

TinyIMCE is not working: At Hostgator, I cannot access the images that I know are in there (at sites/default/files/field/image and at sites/default/files/pictures). In the text editor, I select the ...
3
votes
1answer
445 views

Select an Image style depending on external/dynamic factors (theme region or other field content)

I have a Bean (bundle that generates blocks) which I display in one of 2 different theme regions. Either in the header, or the footer. This Bean contains an Imagefield, which is rendered through an ...
1
vote
1answer
527 views

Programmatically update field collection data in custom entity

I am in desperate need of help. I have a custom entity called Question which has a bundle called data. Within the data bundle, I have a collection field called options with two subfields called ...
1
vote
1answer
468 views

Change the default timezone variable_get from views

What I want is to change the way drupal views get the site's timezone setting. I want to set it manually in code. Searching through the files I noticed that the function "views_get_timezone()" in ...
0
votes
1answer
504 views

Adding a 'OR' condition to query

I need to add a OR condition to my query so that I can get all nodes related to a particular term. Here is what I have done : $query = \Drupal::database()->select('taxonomy_index', 'ti'); $query-&...
0
votes
1answer
507 views

How update programmatically node entity with empty field_image?

i need to make an import from one mysql table in my base. I create node with : $value= array( 'type' => strtolower($typeProduit), 'field_1'=>"test", ...
0
votes
4answers
747 views

How can I serve a separate CSS file for Internet Explorer?

I am setting responsive design for only IE (Internet Explorer) in Drupal 7. Is there any method or solution this file is working with only IE not for Firefox and Chrome?
0
votes
1answer
1k views

How to write SQL Statements With Spaces In Column Names

Hi I am trying to write a Dynamic Query to get data from the database but I am facing issues to write a query for column names with white spaces. My Product_Details Table looks as below: | S.No. | ...
1
vote
1answer
572 views

Search Api Autocomplete doesnt filter by language

We're using Search API Autocomplete with Search API 7.x-1.9 on a site set up with Solr (Websolr) serving nodes in both English and German. I'm looking to be able to filter the results by ...
2
votes
1answer
469 views

Admin approval of Commerce order

I am building a proof of concept ecommerce solution using commerce kickstart v2 I wish to implement a system where a user can submit an order but an admin must approve orders before the customer can ...
0
votes
2answers
671 views

Entity Reference multi value fields, filter on parent

I have two content types: Family and Members. Family content type has an entity reference field of type Member and can have unlimited values(multiple values). My question is: How to create a view that ...
1
vote
1answer
619 views

Nivo Slider jQuery plugin Not installed

I´m trying to install Nivo Slider to my website. I was following this tutorial from the official plugin website. I have the folder "all" an inside it I have "libraries", "modules", and "themes". I ...
-1
votes
0answers
63 views

How can I limit access to static pages in my project? [closed]

I have a site I created with Drupal 8, lets say https://example.com/. I have "embedded" a static site (a bunch of static pages linked to each other) as a "subsite" of example.com, ...
0
votes
1answer
474 views

Entity form in ctools modal popup, whilst passing in values from current node

I need to open an entityform in a modal popup. I have got this working using 'Modal operations'‎ and 'Modal forms' modules following this guide: http://julian.pustkuchen.com/en/comment/reply/599. My ...
3
votes
2answers
1k views

How do I get comments to be indexed?

I'm not sure if it's actually doing this; I can't see any options for comment fields in the configuration. How can I check? Does it say explicitly somewhere?
0
votes
0answers
41 views

Is it possible to save HTML source code as it is with indentation etc.? [closed]

Is it possible to save HTML coding on Full HTML content as it is? I would want to save all the indentations, line breaks and spaces.
1
vote
2answers
1k views

Add to cart form AJAX not working when loading a product display via AJAX

I am trying to create "quick buy" functionality. I have a product listing and a customer is able to click on "quick buy" for that product and then I want to be able to load up a view mode for that ...
1
vote
1answer
441 views

Aggregated CSS & JS files revert to old version

I'm troubleshooting an odd issue on my Drupal 7 site where it seems that old versions of our aggregated CSS & JS files are used some amount of time after a cache clear. How this is playing out is ...

15 30 50 per page