function redirect_if_no_filters in Taxonomy Facets 7.3
Same name and namespace in other branches
- 7.2 taxonomy_facets.module \redirect_if_no_filters()
Somtimes if there are no filters on the site, the site admin wants to redirect to a specific page, or to home page, this is setting in admin page
1 call to redirect_if_no_filters()
- taxonomy_facets_print_landing_page in ./
taxonomy_facets.module - Print the page that displays list of nods when filters are applied.
File
- ./
taxonomy_facets.module, line 399
Code
function redirect_if_no_filters($filters_number) {
$gotohome_if_nofilters = variable_get('taxonomy_facets_redirect_to_home', FALSE);
if ($filters_number == 0 && $gotohome_if_nofilters) {
// but if user specifies different page redirect to that page
if ($redirect_to_page = variable_get('taxonomy_facets_redirect_to_page', FALSE)) {
drupal_goto($redirect_to_page);
}
else {
drupal_goto();
}
}
}