Drupal add php files




















Viewed 12k times. Improve this question. Add a comment. Active Oldest Votes. Improve this answer. Jimmy Ko 2, 1 1 gold badge 9 9 silver badges 20 20 bronze badges.

This makes sense. This means that I can use it to page--node--xx. You could do it in a html. In other words a lot more complicated.

You can try to insert the JS files by the preprocess function in your theme's template. I have tried successfully the preprocess solution for the whole site. It was in the 'if' part that I got confused. Did not know which variable to check. Still unsure. Normally, in a template I would find the nid from a url argument. Does this work in the template. Thanks anyway. Sorry about that.

Stack Overflow for Teams — Collaborate and share knowledge with a private group. Create a free Team What is Teams? Collectives on Stack Overflow. Learn more. Drupal 8 custom module add php classes Ask Question. Asked 5 years, 7 months ago. Active 5 years, 7 months ago. Viewed 2k times. This is all good. Improve this question. Cybercampbell Cybercampbell 2, 10 10 gold badges 45 45 silver badges 75 75 bronze badges.

And what exactly is the question? Add a comment. Active Oldest Votes. Improve this answer. Thanks acrosman - Didn't solve the issue but lead me in the right direction. Glad it got you where you needed to go. Frank Drebin Frank Drebin 5 5 silver badges 11 11 bronze badges. Thank you very much guys.

Libraries module provides it's own way to include external PHP files from the libraries. David Lukac David Lukac 7 7 silver badges 16 16 bronze badges. ElusiveMind ElusiveMind 5 5 bronze badges. This appears to be mostly a comment rather than an answer. References to "the second answer" are fragile as answer order may change. Sign up or log in Sign up using Google.

Sign up using Facebook. Sign up using Email and Password. Post as a guest Name. Email Required, but never shown. The Overflow Blog. Stack Gives Back Safety in numbers: crowdsourcing data on nefarious IP addresses.

Featured on Meta. New post summary designs on greatest hits now, everywhere else eventually.



0コメント

  • 1000 / 1000