restric view row by the URL in block I have a view block disply that contains a list of nodes.
i want to restrict Nid's by my url in one field in node.(Similarly, system block visibility)
for example i have a field with name field_visibility and save node by fill that gallery

so, my list in block is:


  view-row-1 => [nid]-1 => field_visibility ='gallery' view-row-2 =>
  [nid]-2 => field_visibility ='contact' view-row-3 => [nid]-3 =>
  field_visibility ='blog' . . .


so in page www.example.com/gallery, in block should be

1. [nid]-2
2. [nid]-3


and in page www.example.com/contact, in block should be

1. [nid]-1
2. [nid]-3
No need to use field_visibility

try this if using Views 3


Click on the "advanced" tab.
Click on add under "contextual filters".
Choose Content:nid.
Under "when the filter variable is not available, choose "provide default value".
From the drop down menu select "content id from url".
Scroll all the way down to the bottom of the window and click on the "More" link.
Click "Exclude"