How to print a variable set in my custom module's inc file in node-contenttype.tpl.php
To get a variable to a custom node.tpl.php you need to do this in MODULE_preprocess_node(&amp;$variables) usually this is done in your template.php file located inside your themes directory, however, because you are calling a private function _taobao_get_page(), I think you need it inside your module.

Something like

MODULE_preprocess_node(&amp;$variables) {
   if ($node-&gt;type == 'mycontenttype') {
      $variables['linkz'] = X;
   }
}


Now you can call $linkz inside your tpl.php file