Hello,

I was just working on a site that uses two url aliases for a couple of nodes. This happens because if the node is viewed in one context it would require a different styling. These different contexts are being controlled with the url alias. /about for the normal site and /iframe/about (for example. we are not using iframes).

Problem:
Currently the path (as used in the body classes) are being generated with a call to drupal_get_path_alias. This doesn't get the actual path that is currently being viewed.

Proposed Solution:
Use request_uri to get the actual path that is being requested.

Patch to follow.

Files: 
CommentFileSizeAuthor
#1 put-actual-path-in-body-class-1835078-1.patch784 bytesfrob

Comments

Status:Active» Needs review
StatusFileSize
new784 bytes

Here is the patch.

Status:Needs review» Needs work

Using the PHP function request_uri() isn't going to play well with other modules that manipulate the path, like the internationalization module, path alias, etc.

I'm tempted to won't fix this since it is such an edge case. But I'll leave it open to see what comes up.