function HOOK_preprocess_page(&$vars) {
global $user;
if (!in_array('administrator', $user->roles) && variable_get('maintenance_mode') == 1 && arg(0) != 'user') {
$vars['theme_hook_suggestions'][] = 'maintenance_page';
}
else if (drupal_is_front_page()) {
$vars['theme_hook_suggestions'][] = 'page__front';
}
}
Other Articles
How To Install Webmin on Ubuntu 18.04
How To Set or Change Timezone on Ubuntu 18.04 & Ubuntu 16.04
Flexslider Arrows Changed by arrow Images
send Variable to Js File From PHP in drupal Custom Module
Enable Drupal 8 Error Reporting
Wordpress Revolution Slider error after upgrade to php 7
Export Mysql database using SSH
Convert a certificate into the cer,crt,der,pem format
Render block and views block drupal 7 programmatically
Creating a Self-Signed SSL Certificate linux/centos
Jquery prevent enter to submit form
Import Mysql database using SSH
Getting permission error when installing CiviCRM under Drupal with Xampp
How to create the directories and sub directories in one command linux
Wordpress Error with php 7.1 - PHP Fatal error: Uncaught Error: [] operator not supported for strings
Install Multiple PHP 7.3 / 7.2 / 7.1 on Ubuntu 18.04 / Ubuntu 16.04
How to Manually Disable a WordPress Plugin
Create Node drupal 8 programmatically with image upload using custom module
Render a drupal node d7
Drupal 8 add custom menu classes to using menu.html.twig
Drush Installation
How to render block in Drupal 8 theme template
Html Dom parser to Extract the HTML data from Html page
Recent Posts
[SOLVED] PHP executable not found. Install PHP 7 and add it to your PATH or set the php.executablePath setting
If you get the same error like below in VScode editor then you are the right place to
Redirect Old Domain to New Domain via .htaccess
Usually we develop the site on developement or subdomain and when we finally mirgate the to new domain then some of thing will remain or page redirect happens in sometimes , so In this case .htacc
Create a Flag link programmatically and render flag link in twig template drupal 8
This article is refer to generate the flag link programmatically and render in drupal 8 twig template, before in drupal 7 its was quiet easy to render or generate flag link in just a single line of
Jquery prevent enter to submit form
If you want to prevent the form submit using jquery, then this page helps you to doing this.
Code:
Play Pause HTML5 Video using Jquery
HTML5 video playing on any web page is very easy, in this tutorial we can show you how to add video on html and make it play and pause without using html controls.
Import and Export Drupal 8 Views, Or Import and Export any configuration Drupal 8
Import and Export configuration is the basic protocol to staging the website or production website deployment, In Drupal 7, we need the extra modules to import and export or we can use features mod
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 you, sometimes we need different version to oth
Subscribe to Mailchimp programmatically via api with PHP
In this tutorial we can see how to subscribe to the mailchimp subscribe list using php programmatically via api,
For this you need a mailchimp account, api key and list id
How you can get Mailchimp API KEY
By Follow steps below, you can find the api key or create the api key at mailchimp and use it to your website to connected the site with mailchimp to collect the subscribe in fastest way.
How to get your MailChimp LIST ID
Mailchimp is marketing automation platform and is provide email for marketing your product or business whatever you like, today its most trusted service providing all over the globe.
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 menu classes to menu ul li using menu.html.twig.