As already answered on this list, there exist several ways to accomplish this.
The difference between:
$m->request_comp->path
and
$ENV{REQUEST_URI}
is the following:
$m->request_comp->path returns the actual component called, like:
/news/post/index.mhtml
whereas $ENV{REQUEST_URI} will only return /news/post/ if index.mhtml
is in "DirectoryIndex" and you actually only requested "/news/post/".
I think the difference is significant as the first one reveals your
filename, the 2nd does not. I for one never reveal my filenames, but
rather build up a directory structure and make an enormous amount of
index.mhtml files. I find this better for both cosmetic reasons and
security reasons. It also makes it easier to move from .mhtml
extensions to, say, .mason - or even .hph ;) or whatever you fancy.
My 2 cents
- Nicolai
Quoting Anthony Ettinger <[EMAIL PROTECTED]>:
> I want to flag a menu item as active based on the URL.
>
> Does anyone know how I access the value of the current url? ie
> "/page/foo.html"
>
> --
> Anthony Ettinger
> Ph: 408-656-2473
> http://chovy.dyndns.org/resume.html
> http://utuxia.com/consulting
-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
_______________________________________________
Mason-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/mason-users