I want to use an exposed filter in my view to allow users to list all nodes with the same title.

I have tried the link below but I have to manually pass the argument via the URL to get it to work.

Views related nodes with same Title

  • What type of filter are you talking about, select list, autocomplete ... ? – mchar Aug 13 '16 at 19:56
  • Its a text input field. I have attached my views exposed filter settings in the following URL link – Samp Aug 13 '16 at 20:04
  • Unless I am mistaken, according to your view's settings, you have what you want, an exposed text filter listing all nodes with the same title. What's wrong with that ? – mchar Aug 13 '16 at 20:52
  • You are correct it does return a result if the filter matches the title of a node but it only lists one node title instead of all nodes of the same title. – Samp Aug 13 '16 at 21:35
  • 1
    Check two things: 1. That the pager is properly set to show more than one items, eg: Full | Paged, 10 items 2. And the query. You should see something like that: WHERE (( (node.status = '1') AND (node.type IN ('my_content_type')) AND (node.title LIKE 'Node title' ESCAPE '\\') )) – mchar Aug 13 '16 at 22:36

It is possible that your other two nodes have spaces at the end of the title. Check that, and if it is not the issue - try changing your exposed filter operator to Contains instead of Is equal to and see if you get 3 nodes as the result.

enter image description here

  • 1
    "Contains" will not return nodes with the exact same title only, will also return and nodes with parts of the searched text in the nodes titles. The thing is that for some reason Jerry's View, although is setup correctly, is not working as expected. – mchar Aug 15 '16 at 14:31
  • @mchar is correct changing the exposed operator to "Contains" lists all nodes that contain the searched text but it does not return nodes with only the exact search term as the title – Samp Aug 15 '16 at 15:33
  • @Jerry have you also checked for spaces in other titles? – oksana-c Aug 15 '16 at 19:09
  • @oksana-c yes I made sure the titles don't have any spaces. All three are identical. – Samp Aug 15 '16 at 21:11

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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