$saved_layout = JRequest::getVar('layout');
 // save layout ...
 $saved_option = JRequest::getVar('option');
 // save option ...
 $saved_view = JRequest::getVar('view');
 // save layout ...
 $target_layout = $mcats_selection || !$catid ? 'mcats' : '';
 JRequest::setVar('layout', $target_layout);
 JRequest::setVar($target_layout == 'mcats' ? 'cids' : 'cid', $limit_filters_to_cat ? $catid : 0);
 JRequest::setVar('option', 'com_flexicontent');
 JRequest::setVar('view', 'category');
 // Get/Create current category model ... according to configuaration set above into the JRequest variables ...
 $catmodel = new FlexicontentModelCategory();
 $catparams = $catmodel->getParams();
 // Get current's view category parameters this will if needed to get category specific filters ...
 $catmodel->_buildItemWhere($wherepart = 'where', $counting = true);
 $catmodel->_buildItemFromJoin($counting = true);
 // ALL filters
 if ($display_filter_list == 0) {
     // WARNING: this CASE is supposed to get ALL filters regardless category,
     // but __ALL_FILTERS__ ignores the 'use_filters' parameter, so we must check it separetely
     // ... $params->set('filters_order', 1);  // respect filters ordering if so configured in category
     $filters = !$params->get('use_filters', 0) ? array() : FlexicontentFields::getFilters('filters', '__ALL_FILTERS__', $catparams);
 } else {
     if ($display_filter_list == 1) {
         // ... $params->set('filters_order', 1);  // respect filters ordering if so configured in category
         $filters = FlexicontentFields::getFilters('filters', 'use_filters', $catparams);
     } else {
         if ($display_filter_list == 2) {
             $params->set('filters_order', 1);
             // respect filters ordering