Hi all.
I want to display the results of taxonomy terms using a custom view.
Modules used:
Pathauto 7.x-1.0-beta1
Views 7.x-3.0-alpha1

What I have done:
I setted taxonomy URL Aliases as: category/[term:name] via Pathauto
Also setted View's path as: category/% to get the needed argument
Selected Taxonomy: Term as argument type.

Everything seems to work as expected in view's Live Preview. That is getting the correct nodes displayed but...
when I try to put an URL like this in my site (e.g. http://example.com/category/foo) I get the taxonomy list page instead :(
I have do some search trying to solve this but without any luck.
Any help with this please...

Thanks in advance.

Comments

ytsurk’s picture

got the same here ..
not with a changed taxonomy URL,
but with a node having the same path then the view.

use a different path for the view, fe.
v/category/%

made it work for me,
i guess it's not possilbe to use paths for different things ..

aha - interesting ..

unik’s picture

Thanks for your reply but...
already tried to use a different path for view but then taxonomy tags that are shown in node's links go to taxonomy pages again (I want my custom view to be used for any taxonomy-term listing)
A module that found and supposed to alter this ( node's term links) is not ported to D7.

ytsurk’s picture

in that file of the used theme,
you can style like you want, thus put also custom links ..

like

   <?php if (!$page):
   
      $box = '<yourMarkUp/>';

$arrayAttrs = array();
$arrayAttrs['class'] = 'class for a';

print l($box, 'node/'.$node->nid, array('html' => true, 'attributes' => $arrayAttrs, 'query' => array('contentonly'=>'true')));

     
  else: ?>

so the second argument of l is your 'custom' link ..
you can also limit that to a content-type

aha - interesting ..

unik’s picture

aha - interesting :D

I'll give this approach a try...

unik’s picture

I have follow your instructions (hackin the field's template file instead of node's ) and finally got my views show up and terms links altered.
Thanks so much for your help!
(btw, can you tell me what "contentonly" means in link's options? :p )

Even with my issue solved I have the feeling that this was not the "proper" way to do it :/
I think views are used very often for just produce more flexible taxonomy lists and a way to override their path is necessary.

ytsurk’s picture

yeah - you're right,
there might be a better way to do that,

as the node teaser preview is used for taxonomy listing,
i think it's not a bad approach,

the contentonly is a querystring param i use,
sorry for pasting that ;)

look at the docs here:
http://api.drupal.org/api/drupal/includes--common.inc/function/url/7 (so the query option)

i'm also new to drupal - and fascinated :D

aha - interesting ..