module development

Articles about module development

How to disable a block programmaticaly with drupal 8

Aug
2020
11
On my custom theme i have a region with 2 blocks. It is an event region block. The first block is a header block and the second block is a view block that renders the active - running events. However when there are no events the view result is an empty result so nothing is rendered but the header events block remains there.

Altering image field widget “alt” or title" label

Jan
2017
04
For altering the "Title" and "Alternate Text" textfields of an image field we have to add an extra Proccess function for the widget form.
// Alter image Title for field_top_image instance
function MYMODULE_field_widget_form_alter(&$element, &$form_state, $context) {

Controlling block page display options programatically

Apr
2015
06
You can set the region, the weight and the path of custom block in a custom module like this:
function hook_block_info(){
    $blocks = array();
    $blocks['my_custom_block'] = array(
        'info' => t('Custom Block Options'),
        'status' => TRUE,

Views and Taxonomy Terms Translation

Feb
2013
12
Have you ever searched “Views” for a way to filter the taxonomy terms by language (as done for nodes), but you didn't find a way to do it? Does “Views” also support that filter in taxonomies or only in nodes? How can I filter the taxonomy terms by language?

How to make a range selector filter in Views

Sep
2012
04
So you think you've figured out everything with drupal and views until you get the request from a client that just cannot be done via stock Views;What was the request about? Making a select box with a range of values where all you have is a CCK number/float.Wait,what?impossible you say?No,not of course , not at all !

Pages

Subscribe to RSS - module development
this is an arrow pointing back to the top of the page