Closed (works as designed)
Project:
me aliases
Version:
5.x-1.0
Component:
User interface
Priority:
Normal
Category:
Support request
Assigned:
Unassigned
Reporter:
Created:
5 Sep 2008 at 17:15 UTC
Updated:
19 May 2009 at 21:13 UTC
Should the 'me' alias work in View arguments/URLs?
I put this in my 'me' Aliases settings:
logs?filter0=me&filter1=flight
And then hoped that when a user is logged in and went to:
http://mydomain.com/logs?filter0=me&filter1=flight it would get to the view that would just contain their entries from this view....it doesn't work tho.
http://mydomain.com/user/me does work so I know the module is working.
Comments
Comment #1
cdale commentedThe me module only works with menu paths, not with query string arguments. i.e anything after ? in the URL will not be processed by the me module. Because Views Arguments are in the menu path, the me module is able to work with them, hence why your second example works, and not your first.
The result you desire could be achieved with a form alter however (I'm assuming you have exposed the form with the filter0 element?), and while this could be implemented quite easily in the me module, it will not be. This is because in views filters, filtering by user is done by user name, not by the uid. This means that if you happen to have a user on your site with the name 'me' you would never be able to filter by that user because if you tried it would end up filtering by the currently logged in user, instead of the user 'me'.
If you still want to try and achieve this type of filtering though, I can help you write a form alter to achieve it, even though I personally think it is a bad idea. I can not see this kind of functionality ever making it into this module.
Marking as by design and changing the title for any one else who might be wondering about this.
Comment #2
andrenoronha commentedthis is my problem: I wanna create a page with the user friends (user relationships module). I have created a block, and it's working fine. So I added the page view and tried in the url: user/%/friends and user/me/friends. None of them seem to be reconized by the menu...
how can I create a link in a menu to my views which depends on the current user?