How do I do this in PN.750 using pnRender and templates? Here's what I have so far.
I have a template: /modules/mymodule/templates/mytemplate.htm.
I created printapp.php which gets all the info and calls pnRender->fetch(xxx) to draw the form.
My module uses pnredirect to get to printapp.php?mid=$mid (where mid is the ID of the thing I'm trying to print) when the user clicks on "print the form".
If I put printapp.php in root and set xxx to "/modules/mymodule/templates/mytemplate.htm" it does nothing. I'm guessing fetch expects the template to be in a certain template directory under the current directory, but there's no documentation I can find on the pnRender class that explains how fetch works (fetch under Smarty is something totally different).
If I put printapp.php in my module directory and change the includes to include the pnAPI.php, etc from ../.., then I get:
Code
Call to undefined function: adonewconnection() in /usr/local/psa/home/vhosts/theboarder.net/httpdocs/includes/pnAPI.php on line 432
I'm assuming (although haven't tried it) that if I change it to a module function, that it will just get wrapped automatically like the rest of it. I was basing my solution on what print.php does for news, although that's not currently a templated solution so of very limited use.
I could change it away from a templated solution, but that seems like a bit of a cop out, because it's all templated so far.
So, basically, how do I go "calling" a page to display a template without the PN wrappings from within a module?
