Hi
i d need some pointers to create a php snippet to do the following:

in an argument set to taxonomy, when argument is not present then if URL == myURL1/* then pass term1 ; if URL == myURL2/* then pass term2

any help is welcome..
tx
Simone

Comments

cimo’s picture

This is what I came up with in the drupal-support chat

    if (module_exists('path')) {
        $alias = drupal_get_path_alias($_GET['q']);
        $alias_array = explode('/', $array); 
        return $alias_array[0];       
    }

but it doesn t seem to work, any problem related to the fact that I am creating a block?

Letharion’s picture

Status: Active » Fixed

What you do there is passing back the first argument in the url unaltered.
The way I read your question, you need to
1) get the second last arg
2) map the arg to whichever term is relevant

Status: Fixed » Closed (fixed)

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