My use case is I want terms still have their taxonomy/term/tid path, overridden by a panel with a view.

The way I figured out how to do it it with taxonomy_filter and a bit of quirkness, by having the view accept tid/tid,tid,tid

For taxonomy_filter I needed it to accept custom path filter bits.

Here's a quickie path that seems to be working so far

Comments

solotandem’s picture

Assigned: Unassigned » solotandem

Help me understand your suggestion. Are you saying the URL settings in the Advanced settings page of this module could not be used to accomplish this? What does your page URL look like along with the overridden path for the panel and view? Please elaborate further if my questions do not seem to be getting at your suggestion.

hefox’s picture

Yes, the url settings in advanced did not offer enough text insertions that I desired. I'll elaborate more later, but that's the basic of it.

hefox’s picture

StatusFileSize
new2.84 KB

So I rethoght a bit how I'd want it to work

Basically I want terms to retain their own private page, but be filterable by taxonomy filter.

So using this patch I can

Set up/Use case:

advanced settings
path:
taxonomy/term/%arg2
output path:
taxonomy/term/%arg2%gets

taxonomy term view set up to take in one taxonomy tid term (one term)

Exposed filter (as block) that accepts taxonomy terms 'tid' *

Panel with the view attached, views exposed form not displayed.

stuff done in site's module thesite


/*potential replacements*/
function thesite_taxonomy_filter_format_path_args() {
  return array('arg2'=>'%arg2','gets'=>'%gets');
}
/*returns the placements I need*/
function thesite_taxonomy_filter_format_path($tids=array(),$depth = 0,$op = '') {
  $gets = $_GET;
  if (($k=array_search(arg(2),$tids))!==false) unset($tids[$k]);
  
  if ($tids) $gets['tid'] = $tids;
  else unset($gets['tid']);
  
  $query = drupal_query_string_encode($gets, array('q'));
  return array(
    '%arg2'=> arg(2),
    '%gets' => (!empty($query)?'?'.$query :'') ,
  );
}
/*Alters the tokens based on arg2 and $_GET*/
function thesite_taxonomy_filter_format_path_token_arg_alter(&$token,$filter_line) {
  if ($token['arg2']) {
    if ($_GET['tid']) {
      $gets = $_GET['tid'];
      $gets[] = $token['arg2'];
      $token['tids'] = implode(',',$gets);
    }
    else $token['tids'] = $token['arg2'];
  }
}

so at taxonomy/term/ I can use taxonomy filter to filter the view :D, and still retain terms private taxonomy/term/tid, still path aliased. I think that's cool XD!

(Additional coolness would be to limit what nodes the count function counts on, and explode a changeable tid from display in the filters, though if anything I can do that by overriding a theme function I suspect.).

*(Er, that term exposed filter is one that accepts multiple vocabularies, a custom filter of mine; @ http://github.com/hefox/vocabulary/blob/master/views_handler_filter_term...) .

solotandem’s picture

Status: Active » Fixed

In the next dev release and the 6.x-1.3 release, I included an alter hook as you suggested in your patch. The custom filter tokens change had previously been committed. Let me know if this works for you.

Thanks for the suggestions.

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.