I'm working in a multisite, the theme had page--front.tpl.php
file for the main site, but I want to exclude this file in the other sites.
How can I do this?
Its trickier to 'remove' the template on sites you don't want it on because Drupal will always recognize the file format as a valid template and add it to theme suggestions. An easier option would be to affirmatively add it using a custom module only on the sites you want it on. For example, following this answer, here's how you would register a particular template file only on the subsites you want by just selectively enabling the module where you need it:
/*
* Implementation of hook_theme().
*/
function YOUR_SUBSITE_MODULE_theme($existing, $type, $theme, $path){
return array(
'YOUR_SUBSITE' => array(
'variables' => array('content' => NULL),
'file' => 'page--front', // place your file in 'theme' folder of you module folder
'path' => drupal_get_path('module', 'YOUR_SUBSITE_MODULE') .'/theme'
)
);
}
function YOUR_SUBSITE_MODULE_page(){
// some code to generate $content variable
return theme('YOUR_SUBSITE', $content); // use $content variable in moon.tpl.php template
}