Drupal 8: check user is logged in or not in

Drupal

Drupal 8: check user is logged in or not in *.html.twig

In the new era the drupal8 twig is introduce, so old basic php drupal hook is not useful in theme templates. Now twig is power under the template and…

How to render i18n translated block in

Drupal

How to render i18n translated block in drupal 7 Templates

Hey guys,  Sometimes we created the themes template in drupal 7 and we need to render custom blocks and views block to display proper diversion, but…

How to render block in Drupal 8 theme

Drupal

How to render block in Drupal 8 theme template

Similar to Drupal 7, Drupal 8 also gives the customization using theme template, If you want to place a block using programmatically you have…

send Variable to Js File From PHP in drupal

Drupal

send Variable to Js File From PHP in drupal Custom Module

If we need to use the php variable in our js file we can use Core Drupal.settings Functionality :  example: Let we assume we want to use at the…

Render a drupal node d7

Drupal

Render a drupal node d7

If you want to render a node in drupal 7 it is pretty easy, you just a node id or nid of node for doing this: simply <?php $nid = 13; //use…

Drupal 8 add custom menu classes to using

Drupal

Drupal 8 add custom menu classes to using menu.html.twig

In Drupal 8 Twig templates give extra power to drupal to add dynamic content in twig style, In this tutorial we can see how we can add the custom…

How to override different version of Jquery

Drupal

How to override different version of Jquery in Drupal 8 using theme

Drupal 8 use its own jquery version by default and if you want to use the other version of jQuery instead of default than this tutorials steps is for…

Import and Export Drupal 8 Views, Or Import

Drupal

Import and Export Drupal 8 Views, Or Import and Export any configuration Drupal 8

Drupal Views Import and Export configuration is the basic protocol to staging the website or production website deployment, In Drupal 7, we need the…

Drupal site maintenance not affecting front

Drupal

Drupal site maintenance not affecting front page

function HOOK_preprocess_page(&$vars) { global $user; if (!in_array('administrator', $user->roles) && variable_get('…

Prevent to Load a js file on particular page

Drupal

Prevent to Load a js file on particular page using hook_js_alter Drupal 7

Drupal provided the lots of hook to extents its functionality, using this we can prevent a js file to load on particular page using HOOK_JS_ALTER If…

How to make patch file drupal for

Drupal

How to make patch file drupal for contributed or custom modules.

Following Links will Helps you to do same.https://www.drupal.org/node/534548http://tylerfrankenstein.com/user/4/code/create-apply-patch-drupal-module

Drupal 7 Multisite setup

Drupal

Drupal 7 Multisite setup

Here is some links will helps to create a multisite of drupal 7  1. https://www.ostraining.com/blog/drupal/drupal-multi-sites/ 2. https://www.…

Changing the year range in the form's

Drupal

Changing the year range in the form's date element drupal form api

Drupal form api ap usually used to build the custom form to extended the functionality of drupal according to your need. We can change the year…

Bootstrap subtheme dropdown Drupal 7

Drupal

Bootstrap subtheme dropdown Drupal 7

Steps to create sub theme and mutilevel dropdown :- 1. Download the Bootstrap theme from the drupal sites here. 2. Create the subtheme using cdn…

Drupal 7 content type template

Drupal

Drupal 7 content type template

Open the template.php file in your theme for editing. Look for a function called yourthemename_preprocess_page (replace the yourthemename with your…

Enable Drupal 8 Error Reporting

Drupal

Enable Drupal 8 Error Reporting

To Enable Drupal 8 Error Reporting, Put This code at top of sites/default/settings.php. error_reporting(E_ALL); ini_set('display_errors', TRUE);…

Drupal 8 Opcache Problem with xampp

Drupal

Drupal 8 Opcache Problem with xampp

;Put this code in php.ini (C:\xampp\php\php.ini) zend_extension=php_opcache.dll [opcache] ; Determines if Zend OPCache is enabled opcache.enable=1…

WAI-ARIA Roles

Drupal

WAI-ARIA Roles

See Details Here https://www.drupal.org/node/1179668

Schema API Drupal not accept the datatype

Drupal

Schema API Drupal not accept the datatype like date or datetime

Schema  Api Drupal 7 and Drupal 8 not accept the datatypes Like data or datatime and generate the warning and sql syntax error while installing the…

List of Most of File Type extension for

Drupal

List of Most of File Type extension for drupal File field

List of Most of File Type extension for drupal File field :  jpg, jpeg, gif, png, txt, doc, docx, xls, xlsx, pdf, ppt, pptx, pps, ppsx, odt, ods,…

Drupal 8 Theming Essential Guide

Drupal

Drupal 8 Theming Essential Guide

What's new? I’ll list some changes with the theming system of Drupal 8 compared to Drupal 7. You may have got familiar with these in the Drupal 7…