Active
Project:
URL alter
Version:
6.x-1.2
Component:
Code
Priority:
Normal
Category:
Feature request
Assigned:
Unassigned
Reporter:
Created:
20 Jan 2011 at 21:39 UTC
Updated:
2 Feb 2011 at 18:25 UTC
I was able to set up inbound and outbound alterations in my module using URL alter, but I need the Context module's path condition to trigger based on the unaltered URL.
For instance, if the user enters something like http://my/path/alias/vid/23/view in their browser, URL alter can translate this to http://node/5/vid/23/view, which allows Drupal to display the appropriate page. But if I set up a condition in Context that's supposed to trigger when path=my/path/alias/*, it won't trigger, since Context is also seeing the altered URL
Is there any way to pass the unaltered URL to the Context module?
Comments
Comment #1
jstollerI was able to work around this issue by adding a few lines to the execute() function in the context_condition_path.inc plugin file. This function now reads:
As you can see, I am grabbing $_SERVER["REQUEST_URI"] directly and adding it to the list of paths that are checked. I don't know if this is the best approach to this problem, but it seems to be working for me at the moment.
I'm changing this to a feature request. I'd like to see this behavior included as an option in the standard Context path condition.
Comment #2
jstollerSorry. I forgot I was posting to the URL Alter issue queue. I've posted a feature request in the Context issue queue as well, at #1048950: Pass unaltered url to path condition after hook_url_inbound_alter(), for anyone who's interested.
I will let this feature request stand, however, on the off chance there is anything which can be done on the URL Alter side to facilitate this functionality.