Need help migrating your site to Drupal?

How to call system/ajax in Drupal 8 ?

Hi Guys, 

I'm converting my D7 website to D8 and in D7 js file I'm calling a ajax request and url is: 

url:  Drupal.settings.basePath + Drupal.settings.pathPrefix +  'system/ajax'

And I have already converted this line as:

url:  drupalSettings.path.baseUrl + drupalSettings.path.pathPrefix + 'system/ajax'

But it is showing 404 not found on the console.

How to call basePath in Drupal 8 js ?

Hi Guys, 

I'm converting my Drupal 7 project to Drupal 8 and in Drupal 7 we are using Drupal.settings.basePath and basePath is set in drupal_add_js function which is deprecated in Drupal 8. 

So, How can I use this basePath in Drupal 8 js ?

Can I make ?

Hi Guys,

It is possible to call a twig file after clicking any button in Drupal 8?
if yes then how can I achieve this ?

How to use docker with drupal and drush?

I'd like to use drush. It needs to run in the drupal container. There's also a drush docker repo. But I have no clue how to make it available whithin the drupal container. It's my first docker and drupal project, so maybe I'm getting things completely wrong.

How can I use drush with this drupal docker image? https://hub.docker.com/_/drupal/ Is it possible to manage it with docker-compose? Maybe extending the drupal container?

This is my docker-compose.yml:

How to create a custom form element in drupal8?

I am adding this new element but #theme_wrapper is not working, only title is showing button is not showing.

How can I convert ?

Hi Guys,

How can I convert this Drupal 7 code of line into Drupal 8:

drupal_add_js(array('resellerId' => $Reseller->id), 'setting');

So that I can use this resellerId in js as:

var reId = Drupal.settings.resellerId;

Please help.

Thanks for advance.

Pages

Subscribe with RSS Subscribe to RSS - Converting to Drupal