Problem: I needed different pages/areas of the site I'm currently developing to display different areas, as well as display a default area. But it needed to be more automated.
Pathauto and Taxonomy don't play well together in Views and so this was part of the problem.
Solution:
Requires Views Slideshow and I'm using Views 3 alpha as well, but I don't know if that matters.
Create a Vocabulary (mine's called Rotating Headers), attach it to the Image content type. Create some nodes, ensuring that they are named differently with pathauto. Upload some Images, tagging them with the same name as that of the path that you want it associated with.
ex: If the path shows "some-path," then the tag would be "some-path."
That's the easy part.
Go into views and create a new node view.
Create a new block.
Filters: Node: published, Node Type: Image, Taxonomy: Vocabulary = Rotating Headers.
Fields: Image: image
Use pager: all items
Style: Slideshow using Views Cycle.
Here's the tricky part.
Arguments:
Taxonomy: Term
Provide Default Argument -> PHP Code
Insert the following:
<?php
$arg = explode('/',drupal_get_path_alias($_GET['q']));
$vid = 9;
foreach ($arg as $thearg){
$term = taxonomy_get_term_by_name($thearg);
firep($term);
if($term[0]->vid == $vid){
$terms[] = $term[0]->name;
}
}
if($terms){