How to add comment form to drupal pages not having node and content type? mymodule.module     

function mymodule_theme() {
return array(
    'mymodule_results' =&gt; array(
        'variables' =&gt; array('var1' =&gt; null, 'continent' =&gt; null, 'country' =&gt; null, 'location' =&gt; null, 'query' =&gt; null, 'total' =&gt; null,'comments'=&gt;null),
        'template' =&gt; 'templates/mymodule_results'
    ),
    }


mymodule.pages.inc

function mymodule_details($beaches = null) {
 drupal_set_title('Beaches Details');
 if (!isset($beaches-&gt;comment_count))
    $beaches-&gt;comment_count = 0;
return array(
    '#theme' =&gt; 'mymodule_results',
    '#beaches' =&gt; $beaches,
    '#attached' =&gt; array(
        'library' =&gt; array(
            array('iks_libraries', 'jquery.tinycarousel'),
        ),
    ),
);
}


mymodule_results.tpl.php

&lt;?php if ($comments): ?&gt;
&lt;?= render($comments) ?&gt;


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.
Comments needs to be attached to a content. If you want to use built-in comments module, you need to:


Use "simple page" content type to create dummy nodes, or create similar one

it might be wise to strip your dummy content type from everything except title and comments
revoke edit and delete rights, no one should be able to do it

In your module's install file, make sure this content type is enabled and create a dummy node for each of pages you need comments on
Set node's paths to match paths of the pages, so people cannot access them directly
Setup Global Redirect or similar to always redirect from /node/$nid to path
In your module load node and pass it to theme so you could render comments in tpl.php file


That would be about it, if you need more details on any of these points, I guess it'll be worth a separate question.