New menu template not showing anything

I am building Bootstrap-based theme and I have created one block that renders the main menu.

return array(
       '#markup' => drupal_render($menu),
       '#theme' => "menu__mobile",
     );

As seen above I state that the theme file should be menu--mobile.html.twig. If I state no "#theme" variable it uses the default menu--main.html.twig.

How to check if the current password that the user gives in the password reset form matches with the hashed password in Drupal 8

I'm trying to reset a user password programmatically in Drupal 8 without the email link. For this the first step would be to check if the password(which is plain) that the user enters in the password reset form is matching with the hashed password of the respective user. And then save the new password.

Each time I hash the password, its giving a different value, this is because its salted. How shall I compare the password which the user enters in the form with the hashed password from the table.

Cherche bruxellois ayant fait une migration d6->d8

Bonjour,

J’ai fait quelques sites D6 en autodidacte, je veux les passer en D8. Je coince.
Dès que cela dépasse un site de base, j’ai des difficultés.
Je pense qu’il ne s’agit pas de grand-chose, sans doute quelques concepts qui m’ont échappé, mais j’ai besoin d’un coup de main.
J’ai demandé à des professionnels trouvés dans l’annuaire s’ils étaient prêts à me consacrer quelques heures (payées bien sûr), pas de réponses.
Si vous êtes expérimentés et que vous pouvez m’aider, vous pouvez me contacter.
merci d’avance
EM

If "sharing translation" enabled translation not local

I have registered for sharing translations. The problem I face: If at "Interface translation settings" (/admin/config/regional/translate/settings) I check "Enable sharing translation modifications with server" the translation is not stored in my website. If checked off, the translation is stored in my website, but not shared.

I want to use my translations on my website and to share them too ...

Background Images

What is the best way of doing background images?

I have added an image field to basic page. I want to have full screen-width images with text over them on my home page.

I have set up a css library for my theme but i'm a bit confused as to how I can access the images in my twig template (page--front.html.twig).

Thanks!!

Dependent List - AJAX - Drupal 8

I am trying to create a new field type named "City Select" and the purpose of creating this is to add a dependent list. This filed type contain 2 fields named "country" and "city". When selecting on country, a list of cities will be populated based on the country that we have selected. For an initial version I have given cities and countries as constant array and latter it will be replaced with taxonomy terms.

Following is the code of field item

Pages

Subscribe with RSS Subscribe to RSS - Drupal 8.x