Skip to main content

New answers tagged

0 votes

hook_update_n($sandbox) batch getting executed only once

So, for who seek the answer, it's quite simple. The issue of the original code is because the "&" is missing in declaration. function mymodule_update_8001($sandbox) must be function ...
Arnaud Brugnon's user avatar
0 votes

How to get height and width of image style?

I didn't really like the approach to get the dimensions through the effects array, hence these don't represent the dimensions of the final generated image. I found a similar approach to @JFC's ...
Grevil's user avatar
  • 1
1 vote

Remove Admin Toolbar "Manage" item if User has No Access

Ok, more than 6 years later but here is a way to do it: Module Toolbar Menu Clean "Default this module will hide Administration menu and Shortcuts menu from the toolbar, to allow show on user ...
Pin's user avatar
  • 181
0 votes

How to get 'base theme' information about a theme?

As of 2018, you can now get the base theme by inspecting the active theme's extensions: https://www.drupal.org/node/3019948
markfullmer's user avatar
0 votes

How do I export an entity?

Maybe a combination of two functions will help you: configuration-management for saving configurations and a single-content-sync module for saving content entities;
Rod Namoc's user avatar
0 votes

Entity Validation API not invoked on saving the taxonomy overview form – misunderstanding or a bug?

The entity validation API is only invoked if you explicitly call the validate function of the entity. This is normally done in the validateForm function of the form. In the OverviewTerms form no ...
Chris4783's user avatar
  • 1,083
0 votes

How can I change the page title?

The code above suggested by @rpayanm to change the page title for Views doesn't seem to work anymore, so here is our solution that allows to add markup to the View title: function ...
mably's user avatar
  • 11
1 vote

How do I programmatically set the view title?

Here is our solution to add markup to the view title: function my_module_views_post_render(ViewExecutable $view, array &$output, CachePluginBase $cache) { $output['#post_render'][] = function ($...
mably's user avatar
  • 11
0 votes

How do I add HTML markup to the title?

Here is our solution to add markup to the view title: function my_module_views_post_render(ViewExecutable $view, array &$output, CachePluginBase $cache) { $output['#post_render'][] = function ($...
mably's user avatar
  • 11
0 votes

Geolocation and view proximity filter - Can you default proximity to zero?

The Geofield module has added a proximity field, sorting and filter that can be used with Views. See documentation.
batigolix's user avatar
  • 2,614
0 votes

where in database is renamed login for 'Rename Admin Paths"

In PHPMyAdmin under your DB >> SELECT * FROM `key_value` where name = "router.path_roots"; Find router.path_roots Also you have to do the following settings under Options to view ...
harikris's user avatar
  • 359
0 votes

#states visible

If you want to show the field for multiple values selected in another field, you can do it like this: '#states' => [ 'visible' => [ ':input[name="taxResidencyCountryId"]' =>[['value'...
Sujata's user avatar
  • 1
0 votes

How to get triggering_element

Using jQuery you can get the element using ajaxComplete function $( document ).on( "ajaxComplete", function( event, request, settings ) { if(settings.extraData != undefined) { ...
Sidhees's user avatar
  • 179

Top 50 recent answers are included