Set views contextual filter as request_path() 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 '&lt;front&gt;';
}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?
If you want to filter nodes in a Views list that have the same expression in their "Alias" field as the path where the Views Block is shown then you can do it by adding the "Alias" field as a contextual filter and configured like this:  

When the filter value is NOT available
Provide default value
Raw value from URL
Path component 1  

Adjust the path component to the place where your service appears in the path. 

You can also adjust the validation and other options that are relevant to you, but that first bit is what is the most important to match the path to your field. 



The field value content/services might  match only on pages where the path starts with content/services. I haven't tested this, I expect the field expression will be treated as a one string, but the path will only take the first part before the / so in the end it won't match. 

If you find that it doesn't work, then you might make it work with the help of Views Argument Substitutions and Views Contextual Filters OR. 

You could also do it with the Context module and Context entity field but it's a fairly complex to configure.