On Wednesday, 30 May 2012 at 15:34, Joel Willers wrote:
Since it's not a node, it won't render like a node. Does it use page.tpl.php? Sadly, I'm no expert in template files. I'd be interested in the solution to this, so if you figure it out, could you respond and post it? Thanks!Joel-----Original Message-----From: support-bounces@drupal.org [mailto:support-bounces@drupal.org] On Behalf Of DTHSent: Monday, May 28, 2012 4:43 PMSubject: [support] Using the node theme or a template from custom moduleI've got a custom module for D7. On some pages, it returns html. I'm using this in the page callbackfunction example_page(){return array("#type" => "markup","#markup" => "<p>Lorem ipsum etc</p>",);}It works fine, but the page (obviously) doesn't use my node.tpl file, and so it looks different from the rest of the site. It's not that the node.tpl file is particularly complex, but it does some things like wrap the node content in divs that have styling applied to them etc.I could use #prefix and #suffix to wrap the above output in these divs, but is there either a) some way to reuse my node template or b) what's the best way to create a quick clone of the node template that can be reused in render arrays every time I want to output pages from my module. Do I have to call a theme function by #theme or is there a way to use an actual template file?--[ Drupal support list | http://lists.drupal.org/ ]--[ Drupal support list | http://lists.drupal.org/ ]