programmatically create one bean block to the default theme

programmatically create one bean block to the default theme

I am trying to programmatically create beans in a custom module using entity_metadata_wrapper. This is creating a bean for each installed theme. (In Drupal 7) Is there a way I can create only one instance of the bean block? for example in my database it creates a bean... read more
programmatically create one bean block to the default theme

Add views block to views header

I want to have the views header elements after exposed filters, so i try to get the filters in the header. For that, i expose them in a block, and try to add that block to headers, but no success. I also tried to show the filters-block on the view’s page (an... read more
programmatically create one bean block to the default theme

How to set body field display programmatically on node type install?

When hook_installing a new custom node type filled with custom fields I call field_create_instance($instance) where I also set the custom fields’ display like so: ‘display’ => array( ‘default’ => array( // view mode... read more
programmatically create one bean block to the default theme

Add radio buttons and text field together to theme-settings.php

I want to integrate a CSS switcher into my theme, but without the Color module. So I want a radio button list, (or a select list, or dropdown, doesn’t really matter), with a list of different styles, and then I also wanted a ‘Custom’ option, so that... read more
Inline entity form shows a content type select list

Inline entity form shows a content type select list

I am using Inline entity form for a non-commerce project. The settings are:Widget:multiple values,Node:Allow users to add existing content. Mode:Views:Filter by Entity reference view.So I have created an Entity reference view to show only nodes that have been created... read more
programmatically create one bean block to the default theme

How to redirect into a specific page variant

I installed panels, page manager, ctools and page manager redirect. I made a (panel) page say foo1 – admin/structure/pages/add with variant type Panel. In this I put 5 variants named foo1variant1, foo1variant2, foo1variant3, foo1variant4, foo1variant5, I also... read more
programmatically create one bean block to the default theme

Problems with Search API and Entity Translation

I’m building a two-language website (Ukrainian – main, English – second) with the new Entity Translation approach. This approach seems very promising however it does not support multilingual content indexing. I planned to use Search API Database... read more
Field widget item form alter for file field

Field widget item form alter for file field

I want to alter field widget item form of a file field with cardinality > 1 so that a new form element is added to each row of the file tables. For example, in the attached image, I want to add another text field below the “Description” for each... read more
programmatically create one bean block to the default theme

Saving values of a multistep form into custom entity fields

I’m building a module that implement a multistep form based on a custom entity. The entity contains fields which are created by the install file. I was able to create the steps and if I print the $form_state[storage] array in the last step I can see all the... read more
programmatically create one bean block to the default theme

How to redirect the checkout complete page?

In my Drupal Commerce site, I redirect to a local payment API with a custom module after the user selected the local payment gateway in the review order page. The users enter username and password in the local payment website; if the user is authenticated... read more
programmatically create one bean block to the default theme

Is this the correct way to add a page with hook_menu()?

I’m trying to create a page through hook_menu() so I can add my custom block with context instead. function my_module_menu() { $items[‘my_page’] = array( ‘title’ => ‘my_page’, ‘description’ =>... read more
programmatically create one bean block to the default theme

Basic Password Reset steps not working

I have reviewed other similar posts, but none matches my problem. I built a Drupal site based on an old ASP.NET site. I imported the users from the old DB (which had passwords in plain text!). Most users have been able to log in fine, using their old username (email... read more
programmatically create one bean block to the default theme

How can I programmatically reorder active menu items?

I have an ‘audience’ menu which has 4 links. When a user visits one of these links, it becomes active, and I want to push it to the front of the menu item list. Outcomes would like like; Pitchers | Catchers | Hitters | Coaches Coaches (active) | Pitchers |... read more
programmatically create one bean block to the default theme

Solr multi-select facets occurs bad request error

I faced with a weird problem using apache solr faceting search. While selecting two facet constraints, solr respond with 400 error: “400” Status: null: null HTTP ERROR 400 Problem accessing /solr/project/select. Reason: null Basically I have one index... read more
programmatically create one bean block to the default theme

Custom view for Entityform submission

I have a simple Entityform where the user selects from a list of Profile2 user profiles (internal staff and external staff). In simpler terms, the user selects from a list of entities (ie. pick 3 from a list of 10). The Profile2 user profiles are being shown on the... read more
programmatically create one bean block to the default theme

Adding conditional statements as Math expression to custom text fields in views

I have created views in which i have added custom text and Math expression. I displayed view in table format I created one Math expression which is noticed below: [Field 1] – [Field 2] I have displayed this expression into another custom field in views. Now i... read more
programmatically create one bean block to the default theme

Replacement pattern for one value of a multivalue field in views

Rewriting the results of a views field, I wonder if there is a way to use a replacement pattern for the first, second and third value of a multivalue field. In my case, as example: I have tried to use this rewritten tags field: [field_tagging:0] [field_tagging:1]... read more
programmatically create one bean block to the default theme

How can I import the configuration on a different site?

I have this error when I try to import the config of an another site: The staged configuration cannot be imported, because it originates from a different site than this site. You can only synchronize configuration between cloned instances of this site. I have 10... read more
programmatically create one bean block to the default theme

How to use Views PHP get Taxonomy field value and field collection value?

I am currently using Views PHP module to use Field Global PHP to render view value, but I dont know how to read taxonomy field value and field collection value, did anyone know how to do it?? Beside, my field collection has three field, one is boolean and the other is... read more
programmatically create one bean block to the default theme

Can I Search an entity reference with search api db?

I am using the search api database backend together with a views (with exposed fulltext search field). I want to show a ‘related field’ that is related to a content type that is being indexed. When the entity reference field only holds 1 value, all is... read more