mymodule.module
function mymodule_theme() {
return array(
'mymodule_results' => array(
'variables' => array('var1' => null, 'continent' => null, 'country' => null, 'location' => null, 'query' => null, 'total' => null,'comments'=>null),
'template' => 'templates/mymodule_results'
),
}
mymodule.pages.inc
function mymodule_details($beaches = null) {
drupal_set_title('Beaches Details');
if (!isset($beaches->comment_count))
$beaches->comment_count = 0;
return array(
'#theme' => 'mymodule_results',
'#beaches' => $beaches,
'#attached' => array(
'library' => array(
array('iks_libraries', 'jquery.tinycarousel'),
),
),
);
}
mymodule_results.tpl.php
<?php if ($comments): ?>
<?= render($comments) ?>
I need to include the comment form in the template page, But i have not created a content/node type for this. I'm displaying the results in the template page.