I have some panels on my site. Previously, I was using custom content panes with the PHP filter to call functions in a custom module. The custom function had lots of
print() statements and I simply dumped a bunch of HTML to the screen.
Now, I am trying to reform my bad programming practices by moving the custom content panes into Ctools content types. I successfully created a content type, but when I call my function (in my custom module) full of
print() statements, all of the HTML gets dumped to the top of the page, instead of where the content type has been placed within the panel.
Reading through articles online, it appears this is because the content pane expects me to return something it can render, not directly
print() the HTML. Is there another PHP function I can use to gather up all the HTML I was previously using
print() for? What is the correct way to output a bunch of HTML in a ctools content type?
(If this seems obvious, please bear with me. I'm not a programmer by training and I'm probably in a bit over my head.)