How to chage the page title in drupal 7 LAKHAN GEHARWAR June 11, 2020 /** * Implements hook_page_alter(). */ function MODULENAME_page_alter(&$page) { if(arg(0) == 'checkout') { $test =... Continue Reading
How to add css inline in drupal 7 LAKHAN GEHARWAR June 10, 2020 1. if you're calling drupal_add_css() from your own module (in my case, named custom.module) :- drupal_add_css(drupal_get_path(... Continue Reading
how to hide exposed filter programmatically label and fields in drupal 7 LAKHAN GEHARWAR April 30, 2020 /** * Implements hook_form_alter(). */ function module_name_form_alter(&$form, &$form_state, $form_id) { if ( $form_id =... Continue Reading
Alter menu title hook_alter in drupal 7 LAKHAN GEHARWAR April 23, 2020 1. Alter menu title or add menu item programmatically? function YOURTHEMENAME_translated_menu_link_alter(&$item, $map) { glo... Continue Reading
How to override the view field in drupal 7 using hook LAKHAN GEHARWAR March 19, 2020 /** * Implements hook_views_pre_render(). */ function Moduelname_views_pre_render(&$view) { global $user; if ($view->n... Continue Reading
Show/Hide Column in Views Table in drupal 7 and drupal 8 LAKHAN GEHARWAR March 19, 2020 // Hide the Name Column when Nick Name is shown $('#edit-dyfield-field-girls-nickname').change(function() { if ($('#e... Continue Reading
how to send variable from .php file to .js file?(Drupal Behaviours) LAKHAN GEHARWAR March 19, 2020 You should use drupal_add_js() in your module,there is no need to output the variable in your .tpl.php: Drupal 7 Step:-1 <?php ... Continue Reading
How to programmatically Drupal 78 images with image style 2 LAKHAN GEHARWAR October 25, 2019 Drupal 7 In drupal 7, i use function image_style_url('style', uri) to generate new image with style and return image's pat... Continue Reading