page.tpl.php base on a field criteria in views I'm working on creating different themes in different pages of a site base on several conditions.

first, I want to create a page.tpl.php for all view pages in my site.

second, I want to have tiny specialization on it base on the filter criteria field's value or selected field's value in a page view. I mean different page.tpl.php based on fields value criteria.

I need to change the overall theme so it is not duplicate of is it possible to have one views-view--VIEWNAME--page.tpl for multiple views?

I need to know how to access field's value in my "function MYTHEME_preprocess_page(&amp;$vars, $hook) ".
Salam,
You can do this using hook_preprocess_views_view(&amp;$vars). Your code should be like this:

function YOURTHEME_OR_MODULE_preprocess_views_view(&amp;$vars) {
    $view = $vars['view'];
    // the values of the view, filter criteria and the value of fields are in $view
    if(CONDITION1 == true)   
        $vars['theme_suggestion'] = 'views_view__custom_pages1'
    else if(CONDITION2 == true)   
        $vars['theme_suggestion'] = 'views_view__custom_pages2'
}


Then create files views_view__custom_pages1.tpl.php and views_view__custom_pages2.tpl.php and theme the view. In this way different themes are defined for the same view.

You also said I need to know how to access field's value in my "function MYTHEME_preprocess_page(&amp;$vars, $hook) ", what variables do you need to find it's value?