Hi there,

I needed to filter nodes with link-fields by their given URL, but there it seems there is no argument handler for that, yet. Since raw URLs are not suitable for being arguments (slashes in the URL prevent Views to interprete the URL as ONE argument), they have to be urlencoded. I've attached a patch here which adds the appropriate Views handler where the URL argument gets decoded before processed. There is also a validator plugin which can be configured to check against internal/external/mailto/front URLs.

Please review

CommentFileSizeAuthor
#2 720380_2.patch7.14 KBsammys
#1 link.patch5.72 KBjapanitrat
link.patch5.82 KBjapanitrat

Comments

japanitrat’s picture

StatusFileSize
new5.72 KB

err, wrong patch. new one attached here.

sammys’s picture

Title: URL as argument in Views » URL as argument/filter in Views
Version: 6.x-2.8 » 6.x-2.9
StatusFileSize
new7.14 KB

Here is a patch to additionally add a filter to restrict nodes displayed to those matching the current URL being browsed by the user. This is handy for using a link field to store internal links that are used to determine when nodes are displayed in a view (e.g content pane view).

Probably would be good to add an operator to it allowing a 'not match' situation but I don't have the time to add this in right now.

broncomania’s picture

This is exactly what I am looking for, but your patches here break my current views. I use views 3 alpha 4 and link 2.9. Are these patches incompatible with existing views or is this maybe a bug in your patches or in views 3?

dqd’s picture

Status: Needs review » Closed (duplicate)

Please post here for all issue relating to views integration, which needs work and reports from all users as much as possible. (all versions)

#1325112: Integration of Link module and Views

NaX’s picture

Thanks a lot guys, this is exactly what I was looking for. FYI: views 2.16