There are fields in content type called URL and Image.
Suppose, A node has "service" value of "URL" field and I'm trying to show views block where current path (service) and "URL" field path (service) are same. The "URL" value can also be "content/services".
I tried with
- adding "Alias" field as contextual filter in views.
- adding URL field
Updated:
I also tried with URL field with PHP Code in contextual filter:
if(drupal_is_front_page()) {
return '<front>';
}else{
return request_path();
}
It works for only one path argument, like if current requested path is services/one
and views contextual filter only takes first path component as you can see in attached image
However, I need to set contextual filter with whole path no matter how many components are requested.
Theme
I have a content type with image and URL fields, I need to show image on the path where URL field is matched with requested path using views.
How would I do that?