drupal8

Remove delete and save button from node on the basis of permission

Recently i was assigned to do this task.

What i have done:

1. Created a permission for required role.

2. Checked permission for current user.

3. If user does not have the specific permission disable delete and save button. Here is the code to check the permission and disable edit and save button.

Being a Drupal 8 Acquia certified developer

Finally i got the time to write about my recent certification on drupal 8.

I have been working on drupal 8 from last past year and half. I just got 83 % in this exam.

 I treated this as a proper exam just like a college exam.

You can never clear if you haven't ever worked on drupal

Study material for drupal 8 exam:

  • Here is the weightage of exam.

 

Manage drupal 8 configurations in version control

This was seems to be nightmare for us when multiple persons working on a single website not locally but on hosting server.

One night, i was going through drush commands, in the end i found some beautiful drush commands:

Those were :

drush cim

druhs cex

Which mean drush configuration import and drush configuration export.

What i did for for making configuration in git:

1. Created a drupal website on my local and add it to the git.

Embed View in Drupal 8

As we are new to drupal 8 things are changed in Drupal 8 as compared to Drupal 7.

Today i am showing how to embed a view in block or in a view. It is very easy.

In drupal there is function :

views_embed_view($view_name, $display_id, $contextual_filter)

create a custom module, in .module file create your own function.

I created the following function:

function snehi() {
  $view_content = views_embed_view('banner', 'block_1');
  print render($view_content);
 }

Pages

Subscribe to RSS - drupal8