Hot answers tagged

1 vote

How can i preprocess variables php to js

To pass data from PHP to javascript, you need to attach the data to the render array of your block (or alternatively to some other render array via preprocess functions). You can see an example here: ...
user avatar
  • 2,690

Only top scored, non community-wiki answers of a minimum length are eligible