0

I come again with new question about Drupal Views and i hope you can help and explain me how to achieve this, I made a page view to display all my content (this works fine) with the following path:

/car/%/%/%

Now I want to get all the aliases of that path, for example: /car/2009/vw/jetta and then get %1=2009, %2=vw, %3=jetta and then use this to rewrite the output of a field to show something like this:

<a href="/details/%1/%2/%3"> [name]</a>,

and with this get my URL like: /details/2009/vw/jetta

I see that maybe this is possible with contextual filter: global: null. I tried to configure it but i only get the URL with tid's (/details/10/25/33) instead of the alias.

Can you explain me how can I configure global:null to get the values that i want without affecting my view results?

1 Answer 1

0

Took me a while but i solved this problem with something like this:

Added 3 Global: Null context filters and then i configured them with something like this:

For global 1: WHEN FILTER VALUE IS NOT IN THE URL>>Provide default value>>Type:RAW value from URL>> Path Component: 1 >> Checked Use Path Alias >> Apply changes

For global 2: WHEN FILTER VALUE IS NOT IN THE URL>>Provide default value>>Type:RAW value from URL>> Path Component: 2 >> Checked Use Path Alias >> Apply changes

For global 3: WHEN FILTER VALUE IS NOT IN THE URL>>Provide default value>>Type:RAW value from URL>> Path Component: 3 >> Checked Use Path Alias >> Apply changes

And with that you can get the values to use them when you want to override a field output using contextual filter values.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.