hack

Articles about hacks

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) {

How to clean deleted fields from your Database

Mar
2016
21
Sometimes, we start building content types with cutom fields through the old mighty CCK module, only to find out later that there is a different need or better approach for the specific field and we need to delete and recreate it.

Hook node_view and content

Jul
2015
08
I was trying to remove some field collection items (with default values but only for one subfield) from a node and although everything was working fine nothing was changing. So what was i doing wrong then? Well there a "small" catch that it is not clear about the node object that is rendered inside the node_view hook.

Super Quick Drupal 7 installation with Drush

Nov
2014
04
The fastest way to install a site is by using Drush. You can skip most of the other steps above too. Start with only the base of Drupal, which you can also get with Drush...
drush dl drupal --drupal-project-rename=example;
cd example;

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?

Pages

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