2

I am having a difficult time understanding how to output even a simple variable using a module. Ultimately I have PHP code that I need to execute to generate a PDF. I managed to do this in V2.5. I'm following all the tutorials that I can find, bu none I feel aren't clear. Any recommendations on the simplest of examples, even if it's just outputting a variable.

Thanks

2

I haven't tried this tutorial yet, but having learned a lot about Craft 3 from Andrew Welch's other tutorials, I don't doubt this may have some nuggets of useful information to get you on your way.

https://nystudio107.com/blog/enhancing-a-craft-cms-3-website-with-a-custom-module

| improve this answer | |
  • 1
    Thanks, I did see this and went through it several times, but it didn't explain how to output data into template. It's for adding a background to the login screen, just not what I need. Thank you though. – Danny Valle Aug 21 '18 at 15:52
  • 1
    To output something into a template, you'd want to create either a Variable or a Twig Extension, just as you would for a plugin. There's a tutorial here as well: craftquest.io/livestreams/building-a-craft-module – andrew.welch Aug 21 '18 at 19:00

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.