Drupal

Need more accurate results? Got a big list to verify?

Click the banner below to go to our recommended premium email verification service, Email Checker.

email-validation

Advertise on Leopathu

Drupal Tricks - 1

drupal-tricks

I needed a way to check the currect user has permission to view the currect/particular page, Searched lot finally got the exact way, going to show the tricks to you in this blog.

Drupal has an api called " drupal_valid_path " , Normally it used to test the url is valid or not. but the trick is that, It also check the user has permission to view the currect/particular page.

String Quotes in YAML File

yaml

 

We all know YAML is "a human friendly data serialization standard for all programming languages". In Drupal 8, the old .INFO files are now gone and have been replaced by YAML files - pronounced “yamel” (rhymes with camel). The following will show the tricks on strings,

Strings : Strings in YAML can be wrapped both in single and double quotes. In some cases, they can also be unquoted:

A string in YAML

'A singled-quoted string in YAML'

"A double-quoted string in YAML"

 

Install Drupal Using Drush

drush

Most of the times developers don't like the GUI, It makes feel lazy. Drupal has a tool (Drush) to do some management work from command line.

And also the installing the drupal site makes very lazy while doing with browser, The Drush has an option to install the full site with a single command.

The Following command will install the drupal in standard method,

drush site-install standard --account-name=admin --account-pass=[useruser_pass] --db-url=mysql://[db_user]:[db_pass]@localhost/[db_name]